Closed
Bug 517007
Opened 15 years ago
Closed 3 years ago
explicitOriginalTarget contains inconsistent element and tagName
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
RESOLVED
DUPLICATE
of bug 662335
People
(Reporter: rob.apodaca, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) In a form with an input and button present, if entering some text into the input element and pressing return, firefox triggers a click event on the first button (if any) in the form. That event object's explicitOriginalTarget property contains the button element instead of the input element. If no text is entered into the input and the enter key is pressed, the event object's explicitOriginalTarget property contains the input element. Reproducible: Always Steps to Reproduce: For the given markup and js: <script type="text/javascript"> function clicker(evt){ alert(evt.explicitOriginalTarget.tagName) } </script> <form action="/" method="post"> <input type="text" /> <button onClick="clicker(event)">Button</button> </form> --Case: With some text 1. Place focus on the text input. 2. Enter a string: "foo" 3. Press enter --Case: With no text 1. Place focus on the text input. 2. Press enter Actual Results: In the case of "With some text": the tagName is "BUTTON" In the case of "With no text": the tagName is "INPUT" Expected Results: In the case of "With some text": the tagName should be "INPUT" In the case of "With no text": the tagName should be "INPUT"
Updated•15 years ago
|
Component: General → DOM: Events
Product: Firefox → Core
QA Contact: general → events
Comment 1•15 years ago
|
||
We should remove explicitOriginalTarget.
Comment 2•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•3 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•