diff options
| author | mrmr1993 | 2017-10-25 16:52:11 +0100 |
|---|---|---|
| committer | mrmr1993 | 2017-10-25 16:52:11 +0100 |
| commit | 4faef57c60a54676fd27b3d0ff42747b0b9b6487 (patch) | |
| tree | a3c0fc3f444079e166bdb1bec5034a98e85f2407 | |
| parent | aca953e06a7cf5aa6906df677a8fb6ed3e688a03 (diff) | |
| download | vimium-4faef57c60a54676fd27b3d0ff42747b0b9b6487.tar.bz2 | |
FF: Workaround bug 1408996 in focusInput's focus listener
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 0beb2110..88ec134a 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -419,7 +419,10 @@ extend root, # Track the most recently focused input element. recentlyFocusedElement = null window.addEventListener "focus", - forTrusted (event) -> recentlyFocusedElement = event.target if DomUtils.isEditable event.target + forTrusted (event) -> + DomUtils = window.DomUtils ? root.DomUtils # Workaround FF bug 1408996. + if DomUtils.isEditable event.target + recentlyFocusedElement = event.target , true (count) -> |
