Closed
Bug 781514
Opened 12 years ago
Closed 12 years ago
when loading a bug with IE all <select> fields are selecting the first item
Categories
(bugzilla.mozilla.org :: User Interface, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: glob, Assigned: glob)
References
Details
Attachments
(2 files)
1.46 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
922 bytes,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
when loading a bug with IE8 all <select> fields are selecting the first item.
no doubt caused by bug 779434.
Attachment #650549 -
Flags: review?(dkl)
that isn't the best fix, due to the UA detection, but i'm having "fun" with IE8.
i'd like to get that reviewed and pushed asap.
i'll attach an updated patch to be pushed during our normal cycle which fixes this without the kludge (hopefully!).
Comment 3•12 years ago
|
||
Your patch will also affect IE9. Is IE9 also affected by this bug?
Comment 4•12 years ago
|
||
IE9 also fails
Comment 5•12 years ago
|
||
Comment on attachment 650549 [details] [diff] [review]
patch v1
Review of attachment 650549 [details] [diff] [review]:
-----------------------------------------------------------------
Looks fine with the fix on checkin. r=dkl
::: js/show_bug.js
@@ +31,5 @@
> if (el_dirty) {
> if (!el_dirty.value) {
> + var preSelectedIndex = getPreSelectedIndex(el);
> + if (preSelectedIndex != -1)
> + el.selectedIndex = preselectedIndex;
s/preselectedIndex/preSelectedIndex/
Attachment #650549 -
Flags: review?(dkl) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified js/show_bug.js
Committed revision 8273.
Summary: when loading a bug with IE8 all <select> fields are selecting the first item → when loading a bug with IE all <select> fields are selecting the first item
here's the real fix, which applies on top of patch v1.
Attachment #650793 -
Flags: review?(dkl)
Comment 8•12 years ago
|
||
Comment on attachment 650793 [details] [diff] [review]
patch v2
I am attempting at testing this on IE9 and I am getting different behavior from FF. On FF, if I simply change a select to a different value from the original bug value, and then refresh the page, my selected value stays the same. If I add console logging statements in various places, I see that under FF, the dirty field for the select is properly updated with a true value and nothing is done onload to the select.
Under IE, when I change a select and hit refresh, the selected option is reset back to the original bug value and will not retain my selected value. When viewing the console log, in onload, it does not see the dirty value as true and sets el.selectedIndex to preSelectedIndex each time. So should this be working the same way in both browsers?
dkl
(In reply to David Lawrence [:dkl] from comment #8)
> I am attempting at testing this on IE9 and I am getting different behavior
> from FF. [snip]
that's the correct behavour -- the goal is to not change the behavour of browsers to be consistent, rather to tweak firefox's behavour to bring it in line with user's expectations and avoid accidental changes.
Comment 10•12 years ago
|
||
Comment on attachment 650793 [details] [diff] [review]
patch v2
Review of attachment 650793 [details] [diff] [review]:
-----------------------------------------------------------------
then r=dkl
Attachment #650793 -
Flags: review?(dkl) → review+
Assignee | ||
Comment 11•12 years ago
|
||
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified js/show_bug.js
Committed revision 8279.
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified js/show_bug.js
Committed revision 8309.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•