ladybird/Tests/LibWeb/Text/expected/focus-chain.txt
Luke Wilde bf34b63439 LibWeb: Don't compare the focus chain's GC::Root contents by reference
The focus chain always consists of newly created GC::Root objects, so
the condition always produced `false`. The fix is to use GC::Root's
overloaded operator== method, which compares the pointers of the stored
type.

This fixes Figma dropdowns and context menus instantly disappearing
upon opening them. This is because they become focused when they insert
them. Because of this bug, it would fire blur events all the way up to
and including the window. Figma listens for the blur event on the
window, and when received, it will instantly hide dropdowns and context
menus. The intention behind this seems to be hiding them when the user
clicks off the browser window, or switches tab.
2025-01-30 19:30:44 +01:00

30 lines
1.7 KiB
Text

== div3 focus
DIV#3 received focus event, target: DIV#3, currentTarget: DIV#3
DIV#3 received focusin event, target: DIV#3, currentTarget: DIV#3
DIV#2 received focusin event, target: DIV#3, currentTarget: DIV#2
DIV#1 received focusin event, target: DIV#3, currentTarget: DIV#1
window received focusin event, target: DIV#3, currentTarget: window
== div5 focus
DIV#3 received blur event, target: DIV#3, currentTarget: DIV#3
DIV#3 received focusout event, target: DIV#3, currentTarget: DIV#3
DIV#2 received focusout event, target: DIV#3, currentTarget: DIV#2
DIV#1 received focusout event, target: DIV#3, currentTarget: DIV#1
window received focusout event, target: DIV#3, currentTarget: window
DIV#5 received focus event, target: DIV#5, currentTarget: DIV#5
DIV#5 received focusin event, target: DIV#5, currentTarget: DIV#5
DIV#4 received focusin event, target: DIV#5, currentTarget: DIV#4
DIV#1 received focusin event, target: DIV#5, currentTarget: DIV#1
window received focusin event, target: DIV#5, currentTarget: window
== div1 focus
DIV#5 received blur event, target: DIV#5, currentTarget: DIV#5
DIV#5 received focusout event, target: DIV#5, currentTarget: DIV#5
DIV#4 received focusout event, target: DIV#5, currentTarget: DIV#4
DIV#1 received focusout event, target: DIV#5, currentTarget: DIV#1
window received focusout event, target: DIV#5, currentTarget: window
DIV#1 received focus event, target: DIV#1, currentTarget: DIV#1
DIV#1 received focusin event, target: DIV#1, currentTarget: DIV#1
window received focusin event, target: DIV#1, currentTarget: window
== window focus
DIV#1 received blur event, target: DIV#1, currentTarget: DIV#1
DIV#1 received focusout event, target: DIV#1, currentTarget: DIV#1
window received focusout event, target: DIV#1, currentTarget: window