mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Implement popover's close watcher
Auto popovers now correctly establish a close watcher when shown. This means popovers now correctly close with an escape key press. Also correctly hide open popovers when removed from the document.
This commit is contained in:
parent
09a55e56ee
commit
0a02eb639d
Notes:
github-actions[bot]
2024-12-17 03:56:49 +00:00
Author: https://github.com/lukewarlow
Commit: 0a02eb639d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/344
2 changed files with 36 additions and 4 deletions
|
@ -116,6 +116,8 @@ public:
|
|||
WebIDL::ExceptionOr<void> set_popover(Optional<String> value);
|
||||
Optional<String> popover() const;
|
||||
|
||||
virtual void removed_from(Node*) override;
|
||||
|
||||
enum class PopoverVisibilityState {
|
||||
Hidden,
|
||||
Showing,
|
||||
|
@ -181,6 +183,9 @@ private:
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute:toggle-task-tracker
|
||||
Optional<ToggleTaskTracker> m_popover_toggle_task_tracker;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/popover.html#popover-close-watcher
|
||||
GC::Ptr<CloseWatcher> m_popover_close_watcher;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue