Bug 182941 - Remove useless padwithspace="true" attribute for smileys to fix space-editing problems. ui-r=ThomasD, r=IanN
authorThomas Düllmann <bugzilla2007@duellmann24.net>
Thu, 15 Oct 2015 05:38:00 +0200
changeset 23648 1ec5958134965cf1e346e0f405c76015a0631699
parent 23647 f03f355dcdd100da3d056adf81a576465116d952
child 23649 5d9634acc3b6032725cfae09bb66137d0ebdd80f
push id1564
push userclokep@gmail.com
push dateMon, 25 Jan 2016 18:47:24 +0000
treeherdercomm-beta@dec4b138be1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersThomasD, IanN
bugs182941
Bug 182941 - Remove useless padwithspace="true" attribute for smileys to fix space-editing problems. ui-r=ThomasD, r=IanN
editor/ui/composer/content/ComposerCommands.js
mail/components/compose/content/messengercompose.xul
suite/mailnews/compose/messengercompose.xul
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/editor/ui/composer/content/ComposerCommands.js
@@ -3022,21 +3022,16 @@ var nsSetSmiley =
       var selection = editor.selection;
       var extElement = editor.createElementWithDefaults("span");
       extElement.setAttribute("class", "moz-smiley-" + strSml);
 
       var intElement = editor.createElementWithDefaults("span");
       if (!intElement)
         return;
 
-      //just for mailnews, because of the way it removes HTML
-      var smileButMenu = document.getElementById('smileButtonMenu');
-      if (smileButMenu.getAttribute("padwithspace"))
-         smileyCode = " " + smileyCode + " ";
-
       var txtElement =  editor.document.createTextNode(smileyCode);
       if (!txtElement)
         return;
 
       intElement.appendChild (txtElement);
       extElement.appendChild (intElement);
 
 
--- a/mail/components/compose/content/messengercompose.xul
+++ b/mail/components/compose/content/messengercompose.xul
@@ -1010,17 +1010,16 @@
         <toolbarbutton id="outdentButton"/>
         <toolbarbutton id="indentButton"/>
         <toolbarseparator class="toolbarseparator-standard"/>
         <toolbarbutton id="AlignPopupButton"/>
         <toolbarbutton id="InsertPopupButton"/>
         <toolbarbutton id="smileButtonMenu"
                        class="formatting-button"
                        tooltiptext="&SmileButton.tooltip;"
-                       padwithspace="true"
                        type="menu"
                        observes="cmd_smiley">
           <menupopup id="smilyPopup">
             <menuitem id="smileySmile" class="menuitem-iconic" label="&smiley1Cmd.label;"
                       oncommand="doStatefulCommand('cmd_smiley', ':-)'  )"/>
             <menuitem id="smileyFrown" class="menuitem-iconic" label="&smiley2Cmd.label;"
                       oncommand="doStatefulCommand('cmd_smiley', ':-('  )"/>
             <menuitem id="smileyWink" class="menuitem-iconic" label="&smiley3Cmd.label;"
--- a/suite/mailnews/compose/messengercompose.xul
+++ b/suite/mailnews/compose/messengercompose.xul
@@ -606,17 +606,17 @@
       <toolbarseparator class="toolbarseparator-standard"/>
       <toolbarbutton id="ulButton"/>
       <toolbarbutton id="olButton"/>
       <toolbarbutton id="outdentButton"/>
       <toolbarbutton id="indentButton"/>
       <toolbarseparator class="toolbarseparator-standard"/>
       <toolbarbutton id="AlignPopupButton"/>
       <toolbarbutton id="InsertPopupButton"/>
-      <toolbarbutton id="smileButtonMenu" padwithspace="true"/>
+      <toolbarbutton id="smileButtonMenu"/>
       <spacer flex="1"/>
     </toolbar>
 
     <toolbarpalette id="MsgComposeToolbarPalette">
       <toolbarbutton id="print-button"/>
     </toolbarpalette>
 
   </toolbox>