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)

x86
Windows 95
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.2

People

(Reporter: martin.honnen, Assigned: rods)

References

Details

(Keywords: dom0, Whiteboard: Fix in hand)

Attachments

(2 files)

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>
Rod, not sure if this belongs to you or Tom, please reassign if it's not your bug.
Assignee: jst → rods
Keywords: dom0
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
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
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
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Attached patch patchSplinter Review
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
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
Blocks: 83989
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)
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.

Attachment

General

Creator:
Created:
Updated:
Size: