File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 8484 */
8585 handleEvent = function ( e ) {
8686 var obj = $ . data ( elem , "idleTimerObj" ) || { } ;
87-
87+
88+ // ignore writting to storage unless related to idleTimer
8889 if ( e . type === "storage" && e . originalEvent . key !== obj . timerSyncId ) {
8990 return ;
9091 }
282283 }
283284
284285 // Test via a getter in the options object to see if the passive property is accessed
285- var supportsPassive = false ;
286+ // This isnt working in jquery, though is planned for 4.0
287+ // https://github.com/jquery/jquery/issues/2871
288+ /*var supportsPassive = false;
286289 try {
287290 var Popts = Object.defineProperty({}, "passive", {
288291 get: function() {
291294 });
292295 window.addEventListener("test", null, Popts);
293296 } catch (e) {}
294-
297+ */
298+
295299 /* (intentionally not documented)
296300 * Handles a user event indicating that the user isn't idle. namespaced with internal idleTimer
297301 * @param {Event } event A DOM2-normalized event object.
298302 * @return {void }
299303 */
300304 jqElem . on ( $ . trim ( ( opts . events + " " ) . split ( " " ) . join ( "._idleTimer " ) ) , function ( e ) {
301305 handleEvent ( e ) ;
302- } , supportsPassive ? { passive : true } : false ) ;
306+ } ) ;
307+ //}, supportsPassive ? { passive: true } : false);
303308
304309 if ( opts . timerSyncId ) {
305310 $ ( window ) . bind ( "storage" , handleEvent ) ;
You can’t perform that action at this time.
0 commit comments