From 149a64bca65085871a4b0faff72cab26f05b636e Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Tue, 14 Nov 2017 00:43:29 +0000 Subject: FF: Restore window expando on every event listener This should fix *most* problems from Firefox issue 1408996[1]. The root cause of the bug is that document.domain is set, and Firefox discards the 'expando' for the window that contains all properties we set. Technically, this can happen at any time, and so some failures are still possible. This fixes #2799. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1408996 --- content_scripts/vimium_frontend.coffee | 1 + 1 file changed, 1 insertion(+) (limited to 'content_scripts/vimium_frontend.coffee') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 492a82e5..feed4ae5 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -157,6 +157,7 @@ initializePreDomReady = -> # Wrapper to install event listeners. Syntactic sugar. installListener = (element, event, callback) -> element.addEventListener(event, forTrusted(-> + root.extend window, root unless extend? if isEnabledForUrl then callback.apply(this, arguments) else true ), true) -- cgit v1.2.3