mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
add comment on _active_element ordering constraint
This commit is contained in:
@@ -799,6 +799,8 @@ pub fn focus(self: *Element, page: *Page) !void {
|
|||||||
try page._event_manager.dispatch(old_target, focusout_event.asEvent());
|
try page._event_manager.dispatch(old_target, focusout_event.asEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Must be set after blur/focusout and before focus/focusin —
|
||||||
|
// event dispatch can reset _active_element if set earlier.
|
||||||
if (self.asNode().isConnected()) {
|
if (self.asNode().isConnected()) {
|
||||||
page.document._active_element = self;
|
page.document._active_element = self;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user