mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Dispatch pointer events to ::backdrop originating element
This commit is contained in:
Notes:
github-actions[bot]
2025-04-09 11:11:42 +00:00
Author: https://github.com/Gingeh Commit: https://github.com/LadybirdBrowser/ladybird/commit/972547635ff Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4263 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -1002,13 +1002,9 @@
|
||||
ladybird.sendMessage("restoreDefaultSettings");
|
||||
});
|
||||
|
||||
// FIXME: Once we support `dialog::backdrop`, this event listener should be on `siteSettings`.
|
||||
document.addEventListener("click", event => {
|
||||
const close = dialog => {
|
||||
if (!dialog.open) {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: This should be replaced once we support popover light dismissal.
|
||||
document.querySelectorAll("dialog").forEach((dialog) =>
|
||||
dialog.addEventListener("click", event => {
|
||||
const rect = dialog.getBoundingClientRect();
|
||||
|
||||
if (
|
||||
@@ -1019,10 +1015,8 @@
|
||||
) {
|
||||
dialog.close();
|
||||
}
|
||||
};
|
||||
|
||||
document.querySelectorAll("dialog").forEach(close);
|
||||
});
|
||||
}
|
||||
));
|
||||
|
||||
document.addEventListener("WebUILoaded", () => {
|
||||
ladybird.sendMessage("loadAvailableEngines");
|
||||
|
||||
Reference in New Issue
Block a user