mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +00:00
LibWeb: Implement dialog element's close watcher
Dialog elements now correctly establish a close watcher when shown modally. This means modal dialogs now correctly close with an escape key press.
This commit is contained in:
parent
8969f2e34a
commit
d86a6e1bec
Notes:
sideshowbarker
2024-07-17 11:30:54 +09:00
Author: https://github.com/lukewarlow
Commit: d86a6e1bec
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/250
Reviewed-by: https://github.com/awesomekling
3 changed files with 52 additions and 11 deletions
|
@ -34,6 +34,7 @@ private:
|
|||
HTMLDialogElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void close_the_dialog(Optional<String> result);
|
||||
|
||||
|
@ -41,6 +42,7 @@ private:
|
|||
|
||||
String m_return_value;
|
||||
bool m_is_modal { false };
|
||||
JS::GCPtr<CloseWatcher> m_close_watcher;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue