]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 545277: Closed bugs were always marked as FIXED in the resolution
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 10 Feb 2010 05:16:00 +0000 (21:16 -0800)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 10 Feb 2010 05:16:00 +0000 (21:16 -0800)
<select> when show_bug.cgi was loaded
r=LpSolit, a=mkanat

js/field.js

index 1300e1c533e102350e6299f9bb88d0a657b7705f..011d4da52def52d33fba91dc01c7cf54fe32a76e 100644 (file)
@@ -272,6 +272,7 @@ function showHideStatusItems(e, dupArrayInfo) {
         // by "resolution" behave properly when resolution is hidden.
         var resolution = document.getElementById('resolution');
         if (resolution && resolution.options[0].value != '') {
+            resolution.bz_lastSelected = resolution.selectedIndex;
             var emptyOption = new Option('', '');
             resolution.insertBefore(emptyOption, resolution.options[0]);
             emptyOption.selected = true;
@@ -295,7 +296,7 @@ function showHideStatusItems(e, dupArrayInfo) {
             // Remove the blank option we inserted.
             if (resolution && resolution.options[0].value == '') {
                 resolution.removeChild(resolution.options[0]);
-                resolution.options[0].selected = true;
+                resolution.selectedIndex = resolution.bz_lastSelected;
             }
         }