Unify UI workflows and streamline fleet management
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
/** Native dialogs also receive clicks in their padding; only clicks beyond the bounds dismiss. */
|
||||
export function isDialogBackdrop(event: MouseEvent, dialog: HTMLDialogElement | null | undefined): boolean {
|
||||
if (!dialog || event.target !== dialog) return false;
|
||||
const rect = dialog.getBoundingClientRect();
|
||||
return event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom;
|
||||
}
|
||||
Reference in New Issue
Block a user