Closed
Bug 947262
Opened 11 years ago
Closed 10 years ago
Don't dispatch a change event when trying to restore an invalid <select> value
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 29
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(1 file)
1.63 KB,
patch
|
smacleod
:
review+
|
Details | Diff | Splinter Review |
DocumentUtils.restoreFormValue() fires a change event when trying to restore the value of a <select> field even if it doesn't find a matching <option> element. No event should be fired when we end up with the default value selected. I discovered this while working on bug 947212. That will also fix a test that in turn relies on this fix here.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8343771 -
Flags: review?(smacleod)
Comment 2•10 years ago
|
||
Comment on attachment 8343771 [details] [diff] [review] 0001-Bug-947262-Don-t-dispatch-a-change-event-when-trying.patch Review of attachment 8343771 [details] [diff] [review]: ----------------------------------------------------------------- Just one change I'd make, but r+ either way. ::: browser/components/sessionstore/src/DocumentUtils.jsm @@ +203,4 @@ > for (let i = 0; i < aNode.options.length; i++) { > if (aNode.options[i].value == aValue.value) { > aNode.selectedIndex = i; > + shouldFireEvent = true; I think I'd prefer to just set the eventType here instead of introducing a flag variable, but I don't feel too strongly about it.
Attachment #8343771 -
Flags: review?(smacleod) → review+
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Steven MacLeod [:smacleod] from comment #2) > I think I'd prefer to just set the eventType here instead of introducing a > flag variable, but I don't feel too strongly about it. Yeah, that's a great idea. I should have thought of that, thanks :)
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b88706b9f724
https://hg.mozilla.org/mozilla-central/rev/b88706b9f724
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Updated•10 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•