Side navigation
#13143 closed bug (fixed)
Opened January 01, 2013 09:14PM UTC
Closed January 06, 2013 03:27PM UTC
Last modified April 08, 2013 03:49PM UTC
e.target can be a text node on mousewheel
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 2.0 |
Component: | event | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
A recent change removed the code that normalized e.target
to the parent element node in case it is a text node. This was removed because it apparently was an old Safari bug. However, it's still present in current Chrome.
Demo: http://jsfiddle.net/sbrjL/1/
Hover the text node and see the inconsistency:
- IE9 shows "HTMLDivElement"
- Chrome shows "Text"
Attachments (0)
Change History (6)
Changed January 01, 2013 09:16PM UTC by comment:1
Changed January 01, 2013 10:19PM UTC by comment:2
component: | unfiled → event |
---|---|
milestone: | None → 2.0 |
priority: | undecided → high |
status: | new → open |
Thanks for testing and for the report! Well it looks like this check needs to go back in for now. Unfortunately we didn't have a unit test for it, and I'm still not sure we can make a non-contrived one.
For future reference, I don't see that a text node can be the target for any non-deprecated event listed here: http://www.w3.org/TR/DOM-Level-3-Events/#event-types-list
Changed January 06, 2013 03:27PM UTC by comment:3
Changed February 16, 2013 10:10AM UTC by comment:4
Filed https://bugs.webkit.org/show_bug.cgi?id=109939 upstream in WebKit. I've got a patch out for review.
Changed April 08, 2013 03:43PM UTC by comment:5
I get a 'Cannot read property nodeType of null' in jQuery.event.fix method when run inside cordova in android 2.3 device when deviceready event fires. A simple check for event.target && event.target.nodeType === 3 fixes the issue.
Changed April 08, 2013 03:49PM UTC by comment:6
@sp.shut, this is a closed bug and fixed in the current beta. If you have a different bug to report please create a new ticket and *include a test case* in addition to your description.
Err, I meant "**scroll** the text node", of course.