Bug 1556516 - add value to imgSizerGroup radios to make the radiogroup selection work as intended. r=jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Mon, 01 Jul 2019 14:02:34 +0300
changeset 36001 73ce6f5f060aa2bc387bf5d27ecec55deee71c12
parent 36000 0a4f2477de1d93053d5ffefb89b32a58a600412e
child 36002 924dc82526122c8275327cc14cbbf34256562339
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1556516
Bug 1556516 - add value to imgSizerGroup radios to make the radiogroup selection work as intended. r=jorgk
editor/ui/dialogs/content/EdImageDialog.js
editor/ui/dialogs/content/edImage.inc.xul
--- a/editor/ui/dialogs/content/EdImageDialog.js
+++ b/editor/ui/dialogs/content/EdImageDialog.js
@@ -279,17 +279,17 @@ function LoadPreviewImage() {
   } catch (e) {}
 
   if (gDialog.PreviewImage)
     removeEventListener("load", PreviewImageLoaded, true);
 
   if (gDialog.ImageHolder.hasChildNodes())
     gDialog.ImageHolder.firstChild.remove();
 
-  gDialog.PreviewImage = document.createElementNS("http://www.w3.org/1999/xhtml", "html:img");
+  gDialog.PreviewImage = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
   if (gDialog.PreviewImage) {
     // set the src before appending to the document -- see bug 198435 for why
     // this is needed.
     // XXXbz that bug is long-since fixed.  Is this still needed?
     gDialog.PreviewImage.addEventListener("load", PreviewImageLoaded, true);
     gDialog.PreviewImage.src = imageSrc;
     gDialog.ImageHolder.appendChild(gDialog.PreviewImage);
   }
--- a/editor/ui/dialogs/content/edImage.inc.xul
+++ b/editor/ui/dialogs/content/edImage.inc.xul
@@ -87,24 +87,26 @@
         <spacer class="spacer"/>
         <hbox>
           <radiogroup id="imgSizeGroup">
             <radio
               id      = "actualSizeRadio"
               label   = "&actualSizeRadio.label;"
               accesskey = "&actualSizeRadio.accessKey;"
               tooltiptext="&actualSizeRadio.tooltip;"
-              oncommand = "SetActualSize()"/>
+              oncommand = "SetActualSize()"
+              value="actual"/>
             <radio
               id      = "customSizeRadio"
               label   = "&customSizeRadio.label;"
               selected = "true"
               accesskey = "&customSizeRadio.accessKey;"
               tooltiptext="&customSizeRadio.tooltip;"
-              oncommand = "doDimensionEnabling();" />
+              oncommand = "doDimensionEnabling();"
+              value="custom"/>
           </radiogroup>
           <spacer flex="1"/>
           <vbox>
             <spacer flex="1"/>
             <checkbox id="constrainCheckbox" label="&constrainCheckbox.label;"
                  accesskey="&constrainCheckbox.accessKey;"
                  oncommand="ToggleConstrain()"
                  tooltiptext="&constrainCheckbox.tooltip;"/>