Closed
Bug 68135
Opened 24 years ago
Closed 24 years ago
[FIX][LST][EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.2
People
(Reporter: martin.honnen, Assigned: rods)
References
Details
(Keywords: dom0, Whiteboard: Fix in hand)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
The onchange event handler of a SELECT MULTIPLE element should fire when the
user deselects a selected OPTION with Ctrl-Click but it doesn't in Mozilla
<SELECT NAME="selectName"
ONCHANGE="document.getElementById('output').innerHTML +=
event.type + ' at ' + new Date() + '; selectedIndex = ' +
this.selectedIndex + '<BR>';"
SIZE="2"
MULTIPLE
>
<OPTION>Kibo
<OPTION>Maho
</SELECT>
<DIV ID="output"></DIV>
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Rod, not sure if this belongs to you or Tom, please reassign if it's not your bug.
Assignee: jst → rods
Assignee | ||
Comment 3•24 years ago
|
||
I'll take a look for 0.9.1
Status: NEW → ASSIGNED
Summary: onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected → [EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected
Target Milestone: --- → mozilla0.9.1
Assignee | ||
Updated•24 years ago
|
Summary: [EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected → [CBX][EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected
Assignee | ||
Updated•24 years ago
|
Summary: [CBX][EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected → [LST][EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Assignee | ||
Comment 4•24 years ago
|
||
Assignee | ||
Updated•24 years ago
|
Summary: [LST][EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected → [FIX][LST][EVT]onchange of SELECT MULTIPLE doesn't fire when OPTION is deselected
Whiteboard: Fix in hand
Comment 5•24 years ago
|
||
Patch looks fine. I'd move the comment below inside the if, and fix the typo
+ // didn't find any other seleccted items
+ // so we must set the currently selected item to "-1"
+ // this also forces the dispatch of the onchange event
+ if (i == max) {
+ mSelectedIndex = -1;
+ }
[s]r=attinasi
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
a=dbaron for trunk checkin (on behalf of drivers), assuming you've tested the
javascript on the bugzilla query page Component selection and it doesn't do
anything strange, like loop infinitely (and perhaps tested some other
bugzilla-related stuff)
Assignee | ||
Comment 8•24 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•