Add Prettier and ESLint tooling (Refs #77)
This commit is contained in:
+10
-2
@@ -1,6 +1,14 @@
|
||||
/** Native dialogs also receive clicks in their padding; only clicks beyond the bounds dismiss. */
|
||||
export function isDialogBackdrop(event: MouseEvent, dialog: HTMLDialogElement | null | undefined): boolean {
|
||||
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;
|
||||
return (
|
||||
event.clientX < rect.left ||
|
||||
event.clientX > rect.right ||
|
||||
event.clientY < rect.top ||
|
||||
event.clientY > rect.bottom
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user