Consider merging https://chromium.googlesource.com/chromium/blink/+/c58f636fd18fc27944c42e27d6a92a36867c57e1 According to the specification, we should remove focus when a focused element becomes unforcusable, and Internet Explorer follows it. We check focusable state after layout asynchronously because setFocusedNode(0) dispatches synchronous events and callers of Document::updateLayout don't expect DOM state changes. Also, we introduce m_didPostCheckFocusedNodeTask flag to avoid duplicated tasks in the pending task queue.
*** This bug has been marked as a duplicate of bug 112992 ***