Skip to content

Commit

Permalink
Fix #13255. Set a default event target for Cordova.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmethvin committed May 2, 2013
1 parent 9c4a428 commit 6b53915
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 6b53915

Please sign in to comment.