aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authormrmr19932017-11-14 00:43:29 +0000
committermrmr19932017-11-14 00:43:29 +0000
commit149a64bca65085871a4b0faff72cab26f05b636e (patch)
treece128093a3732f3695cee46918a4b8a7ead558ed /content_scripts/vimium_frontend.coffee
parent1880062f68e6f4280b7257f3cd437c0aee7c9696 (diff)
downloadvimium-149a64bca65085871a4b0faff72cab26f05b636e.tar.bz2
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
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee1
1 files changed, 1 insertions, 0 deletions
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)