From 57172459d81a0daea8b9a6f084e3c6d7b947dad5 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 29 May 2017 15:47:16 +0200 Subject: [PATCH] Fix comparing tagName in form observer Listen also to subtree mutations Closes #2321 --- src/lib/tools/scripts.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/tools/scripts.cpp b/src/lib/tools/scripts.cpp index dd82993c3..2bf05f50a 100644 --- a/src/lib/tools/scripts.cpp +++ b/src/lib/tools/scripts.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2015-2016 David Rosca +* Copyright (C) 2015-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -115,10 +115,10 @@ QString Scripts::setupFormObserver() "var observer = new MutationObserver(function(mutations) {" " for (var i = 0; i < mutations.length; ++i)" " for (var j = 0; j < mutations[i].addedNodes.length; ++j)" - " if (mutations[i].addedNodes[j].tagName == 'form')" + " if (mutations[i].addedNodes[j].tagName == 'FORM')" " registerForm(mutations[i].addedNodes[j]);" "});" - "observer.observe(document.documentElement, { childList: true });" + "observer.observe(document.documentElement, { childList: true, subtree: true });" "" "})()");