From 6b5391508e7354076a32375c7f536f8eb91195ee Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Thu, 2 May 2013 13:39:13 -0400 Subject: [PATCH] Fix #13255. Set a default event target for Cordova. --- src/event.js | 6 ++++++ 1 file changed, 6 insertions(+) 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 ) { -- 2.39.5