Decides whether closing a menu or popover must not return focus to its trigger.
Returning focus across frames closes the menu the user just opened elsewhere, so focus stays
where the user put it when that is a web view (activeElement is an <iframe>) or, inside a web
view, when the window no longer has focus. In the main document !hasFocus() can only mean the
OS window was deactivated (a click into a web view leaves the document focused with the iframe as
active element), so restoring the trigger there is safe and helps keyboard users returning from
another application. Inside a web view it is ambiguous (switching applications versus clicking
into another frame) and stays suppressed.
It decides only whether to suppress; useDismissOnWindowBlur restores the trigger itself in
the main-document case.
Decides whether closing a menu or popover must not return focus to its trigger.
Returning focus across frames closes the menu the user just opened elsewhere, so focus stays where the user put it when that is a web view (
activeElementis an<iframe>) or, inside a web view, when the window no longer has focus. In the main document!hasFocus()can only mean the OS window was deactivated (a click into a web view leaves the document focused with the iframe as active element), so restoring the trigger there is safe and helps keyboard users returning from another application. Inside a web view it is ambiguous (switching applications versus clicking into another frame) and stays suppressed.It decides only whether to suppress; useDismissOnWindowBlur restores the trigger itself in the main-document case.