mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Use open-color directly (#1371)
This commit is contained in:
parent
6d30351164
commit
f7e3ee2064
27 changed files with 3283 additions and 197 deletions
|
@ -6,7 +6,7 @@ type Props = {
|
|||
top?: number;
|
||||
left?: number;
|
||||
children?: React.ReactNode;
|
||||
onCloseRequest?(): void;
|
||||
onCloseRequest?(event: PointerEvent): void;
|
||||
fitInViewport?: boolean;
|
||||
};
|
||||
|
||||
|
@ -38,9 +38,9 @@ export function Popover({
|
|||
|
||||
useEffect(() => {
|
||||
if (onCloseRequest) {
|
||||
const handler = (e: Event) => {
|
||||
if (!popoverRef.current?.contains(e.target as Node)) {
|
||||
unstable_batchedUpdates(() => onCloseRequest());
|
||||
const handler = (event: PointerEvent) => {
|
||||
if (!popoverRef.current?.contains(event.target as Node)) {
|
||||
unstable_batchedUpdates(() => onCloseRequest(event));
|
||||
}
|
||||
};
|
||||
document.addEventListener("pointerdown", handler, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue