Closed
Bug 1190
Opened 26 years ago
Closed 26 years ago
selected and defaultSelected DOM attributes meaning reversed
Categories
(Core :: DOM: Core & HTML, defect, P1)
Tracking
()
VERIFIED
FIXED
M4
People
(Reporter: karnaze, Assigned: pollmann)
References
()
Details
The url contains a <SELECT> which has an onchange. There doesn't appear to be
any javascript/dom support for onchange yet. When there is, the select code will
need to be changed to use it.
Updated•26 years ago
|
Assignee: joki → karnaze
Comment 1•26 years ago
|
||
Okay, I've added handling of the 'onchange' event into the event system. Now
we just need to modify the form code to send the event. Passing the bug to
karnaze for that piece.
Reporter | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Updated•26 years ago
|
Assignee: karnaze → pollmann
Status: ASSIGNED → NEW
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•26 years ago
|
Priority: P2 → P1
Assignee | ||
Comment 4•26 years ago
|
||
Just checked in a fix. Currently, it uses the defaultSelected attribute of a
HTMLOptionElement to store the "currently selected" value for that option, which
appears to be wrong, until this issue is resolved.
Leaving bug open until resolved.
Assignee | ||
Updated•26 years ago
|
Summary: onchange not implemented → selected and defaultSelected DOM attributes meaning reversed
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•26 years ago
|
||
Just checked in the fix. The "currently selected" (DOM selected attribute) is
now cached in the selectControlFrame, and is set/queried by the DOM correctly.
Also wired up selectedIndex.
Tested on the 2/1 build. It looks like the onchange command is not being
executed. I wrote some simpler code to test this:
<html>
<head>
<title>MyPage</title>
</head>
<body>
<form>
<select name="list" onchange="alert('onchange is working')">
<option selected>Default
<option>Foo
</select>
</form>
</body></html>
When I select the item "Foo" from the drop-down list, the alert msg isn't
displayed. I expected the "onchange is working" text to be displayed. Is there
anything missing in the JavaScript side? Reopening bug.
Assignee | ||
Updated•26 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 10•26 years ago
|
||
Wow, good catch!
To be specific, your testcase demonstrates three bugs.
1) onchange is not sent for selectboxes that don't have "MULTIPLE" selection
2) Javascript altert dialogs don't work yet
3) The mouseclicked event required to send the onchange to the select box is
only sent if after selecting a new option, you click on the box again (mouse
down and mouse up within the bounds of the rectangle)
Bug #2 I don't know about
Bug #3 I told Tom Pixley about (I think he's working on a fix)
Bug #1 was a typo on my part (= instead of ==) I'll check in a fix.
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 26 years ago
Assignee | ||
Comment 11•26 years ago
|
||
Just fixed the typo. Your test page works for me:
1) The alert is a beep followed by output to the console
2) The combo box must be clicked on after the change for the message to be sent.
Comment 12•26 years ago
|
||
Verified on viewer 3/18 build. Entered bugs 4273 and 4279 for the remaining
issues.
Updated•18 years ago
|
Flags: in-testsuite?
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•