Skip to content

Commit 36e7dad

Browse files
authored
Comment out passive until jQuery is ready
1 parent d1dc587 commit 36e7dad

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/idle-timer.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
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
}
@@ -282,7 +283,9 @@
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() {
@@ -291,15 +294,17 @@
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);

0 commit comments

Comments
 (0)