Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #13143. Event target cannot be a text node.

Check removed in the initial 2.0 refactor but Chrome still needs it. No effective way to unit test; see the test case in #13143.
  • Loading branch information...
commit c61150427fc8ccc8e884df8f221a6c9bb5477929 1 parent d2a51f0
@dmethvin dmethvin authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/event.js
View
6 src/event.js
@@ -470,6 +470,12 @@ jQuery.event = {
event[ prop ] = originalEvent[ prop ];
}
+ // Target should not be a text node (#504, #13143)
+ // Support: Chrome 23+, Safari?
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
},
Please sign in to comment.
Something went wrong with that request. Please try again.