mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
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.
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user