Index: Source/core/page/FocusController.cpp |
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp |
index 8c0002e58fee5754ad3ce1e2135aa09b61563354..fd00e8fce7d0066872e9b96b6c3547f53dae39af 100644 |
--- a/Source/core/page/FocusController.cpp |
+++ b/Source/core/page/FocusController.cpp |
@@ -144,6 +144,7 @@ static inline void dispatchEventsOnWindowAndFocusedNode(Document* document, bool |
if (!focused && document->focusedElement()) { |
RefPtr<Element> focusedElement(document->focusedElement()); |
+ focusedElement->setFocus(false); |
focusedElement->dispatchBlurEvent(0); |
if (focusedElement == document->focusedElement()) { |
focusedElement->dispatchFocusOutEvent(EventTypeNames::focusout, 0); |
@@ -156,6 +157,7 @@ static inline void dispatchEventsOnWindowAndFocusedNode(Document* document, bool |
window->dispatchEvent(Event::create(focused ? EventTypeNames::focus : EventTypeNames::blur)); |
if (focused && document->focusedElement()) { |
RefPtr<Element> focusedElement(document->focusedElement()); |
+ focusedElement->setFocus(true); |
focusedElement->dispatchFocusEvent(0, FocusTypePage); |
if (focusedElement == document->focusedElement()) { |
document->focusedElement()->dispatchFocusInEvent(EventTypeNames::focusin, 0); |