Created
December 18, 2014 17:26
-
-
Save jjgod/a8b140c01217ae692658 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document focused element was set to nullptr on detach, but client | |
wasn't informed so it still believes that the current focused url | |
to be the one that no longer exists. It's a bit of a mystery how | |
this code every worked though. | |
BUG=425584 | |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp | |
index 4427c73..d4a4bac 100644 | |
--- a/third_party/WebKit/Source/core/dom/Document.cpp | |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp | |
@@ -2208,6 +2208,10 @@ void Document::detach(const AttachContext& context) | |
m_activeHoverElement = nullptr; | |
m_autofocusElement = nullptr; | |
+ // Notify client that focused node has changed to empty so that it can clear the current one. | |
+ if (frameHost()) | |
+ frameHost()->chrome().focusedNodeChanged(nullptr); | |
+ | |
m_renderView = 0; | |
ContainerNode::detach(context); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment