diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2013-05-02 13:39:13 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2013-05-02 13:39:13 -0400 |
commit | 6b5391508e7354076a32375c7f536f8eb91195ee (patch) | |
tree | 3b6a3e3db3cff0047df4a0ce40ceb2c8a894f05d /src/event.js | |
parent | 9c4a428528cc47b0ef87a273f191c0fbbccc9678 (diff) | |
download | jquery-6b5391508e7354076a32375c7f536f8eb91195ee.tar.gz jquery-6b5391508e7354076a32375c7f536f8eb91195ee.zip |
Fix #13255. Set a default event target for Cordova.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/event.js b/src/event.js index 97a408839..9262d1d6d 100644 --- a/src/event.js +++ b/src/event.js @@ -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 ) { |