aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authorStephen Blott2017-10-02 15:56:45 +0100
committerGitHub2017-10-02 15:56:45 +0100
commitabb32e2f2974832df08395ef7664561bb57c7324 (patch)
tree7f8a88c4f1b287aa037e1b2f07bc9d59848eca65 /content_scripts/vimium_frontend.coffee
parent10bcb92735f820779950557c5d59d35f769a10fc (diff)
parent0d2a44fb47d7a6599093c6b4de6bcd54da9b7cb8 (diff)
downloadvimium-abb32e2f2974832df08395ef7664561bb57c7324.tar.bz2
Merge pull request #2691 from mrmr1993/ff-fix-xml
FF: Lazy load the Vomnibar for XML documents
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee11
1 files changed, 8 insertions, 3 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 02bdfa2c..4f2e805d 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -160,9 +160,14 @@ installModes = ->
initializeOnEnabledStateKnown = (isEnabledForUrl) ->
installModes() unless normalMode
if isEnabledForUrl
- # We only initialize (and activate) the Vomnibar in the top frame. Also, we do not initialize the
- # Vomnibar until we know that Vimium is enabled. Thereafter, there's no more initialization to do.
- DomUtils.documentComplete Vomnibar.init.bind Vomnibar if DomUtils.isTopFrame()
+ unless Utils.isFirefox() and document.documentElement.namespaceURI != "http://www.w3.org/1999/xhtml"
+ # We only initialize (and activate) the Vomnibar in the top frame. Also, we do not initialize the
+ # Vomnibar until we know that Vimium is enabled. Thereafter, there's no more initialization to do.
+ #
+ # NOTE(mrmr1993): In XML documents on Firefox, injecting HTML into the DOM breaks the rendering, so we
+ # lazy load the Vomnibar. This comes with the expected issues, but is better than breaking all XML
+ # documents.
+ DomUtils.documentComplete Vomnibar.init.bind Vomnibar if DomUtils.isTopFrame()
initializeOnEnabledStateKnown = ->
#