mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #13255. Set a default event target for Cordova.
This commit is contained in:
parent
9c4a428528
commit
6b5391508e
@ -511,6 +511,12 @@ jQuery.event = {
|
||||
event[ prop ] = originalEvent[ prop ];
|
||||
}
|
||||
|
||||
// Support: Cordova 2.5 (WebKit) (#13255)
|
||||
// All events should have a target; Cordova deviceready doesn't
|
||||
if ( !event.target ) {
|
||||
event.target = document;
|
||||
}
|
||||
|
||||
// Support: Safari 6.0+, Chrome < 28
|
||||
// Target should not be a text node (#504, #13143)
|
||||
if ( event.target.nodeType === 3 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user