From: Dave Methvin Date: Thu, 2 May 2013 17:39:13 +0000 (-0400) Subject: Fix #13255. Set a default event target for Cordova. X-Git-Tag: 2.0.1~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b5391508e7354076a32375c7f536f8eb91195ee;p=jquery.git Fix #13255. Set a default event target for Cordova. --- 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 ) {