Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19a5e0bf86 | ||
|
|
42fe6c2632 | ||
|
|
1098a0b909 | ||
|
|
c78e4aab7f |
@@ -20,7 +20,6 @@ import {
|
|||||||
APP_NAME,
|
APP_NAME,
|
||||||
EVENT,
|
EVENT,
|
||||||
THEME,
|
THEME,
|
||||||
TITLE_TIMEOUT,
|
|
||||||
VERSION_TIMEOUT,
|
VERSION_TIMEOUT,
|
||||||
debounce,
|
debounce,
|
||||||
getVersion,
|
getVersion,
|
||||||
@@ -499,11 +498,6 @@ const ExcalidrawWrapper = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const titleTimeout = setTimeout(
|
|
||||||
() => (document.title = APP_NAME),
|
|
||||||
TITLE_TIMEOUT,
|
|
||||||
);
|
|
||||||
|
|
||||||
const syncData = debounce(() => {
|
const syncData = debounce(() => {
|
||||||
if (isTestEnv()) {
|
if (isTestEnv()) {
|
||||||
return;
|
return;
|
||||||
@@ -594,7 +588,6 @@ const ExcalidrawWrapper = () => {
|
|||||||
visibilityChange,
|
visibilityChange,
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
clearTimeout(titleTimeout);
|
|
||||||
};
|
};
|
||||||
}, [isCollabDisabled, collabAPI, excalidrawAPI, setLangCode]);
|
}, [isCollabDisabled, collabAPI, excalidrawAPI, setLangCode]);
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>
|
<title>Excalidraw Whiteboard</title>
|
||||||
Free, collaborative whiteboard • Hand-drawn look & feel | Excalidraw
|
|
||||||
</title>
|
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover, shrink-to-fit=no"
|
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover, shrink-to-fit=no"
|
||||||
|
|||||||
@@ -2737,12 +2737,6 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
addEventListener(window, EVENT.RESIZE, this.onResize, false),
|
addEventListener(window, EVENT.RESIZE, this.onResize, false),
|
||||||
addEventListener(window, EVENT.UNLOAD, this.onUnload, false),
|
addEventListener(window, EVENT.UNLOAD, this.onUnload, false),
|
||||||
addEventListener(window, EVENT.BLUR, this.onBlur, false),
|
addEventListener(window, EVENT.BLUR, this.onBlur, false),
|
||||||
addEventListener(
|
|
||||||
this.excalidrawContainerRef.current,
|
|
||||||
EVENT.WHEEL,
|
|
||||||
this.handleWheel,
|
|
||||||
{ passive: false },
|
|
||||||
),
|
|
||||||
addEventListener(
|
addEventListener(
|
||||||
this.excalidrawContainerRef.current,
|
this.excalidrawContainerRef.current,
|
||||||
EVENT.DRAG_OVER,
|
EVENT.DRAG_OVER,
|
||||||
@@ -11165,9 +11159,20 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
event: WheelEvent | React.WheelEvent<HTMLDivElement | HTMLCanvasElement>,
|
event: WheelEvent | React.WheelEvent<HTMLDivElement | HTMLCanvasElement>,
|
||||||
) => {
|
) => {
|
||||||
// if not scrolling on canvas/wysiwyg, ignore
|
// if not scrolling on canvas/wysiwyg, ignore
|
||||||
|
const path = (event as any).composedPath?.() as EventTarget[] | undefined;
|
||||||
|
const isOnExcalidrawCanvas =
|
||||||
|
path?.some(
|
||||||
|
(n) =>
|
||||||
|
n instanceof HTMLCanvasElement &&
|
||||||
|
n.classList?.contains("excalidraw__canvas"),
|
||||||
|
) ||
|
||||||
|
(event.target as Element | null)?.closest?.(
|
||||||
|
"canvas.excalidraw__canvas",
|
||||||
|
) != null;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!(
|
!(
|
||||||
event.target instanceof HTMLCanvasElement ||
|
isOnExcalidrawCanvas ||
|
||||||
event.target instanceof HTMLTextAreaElement ||
|
event.target instanceof HTMLTextAreaElement ||
|
||||||
event.target instanceof HTMLIFrameElement
|
event.target instanceof HTMLIFrameElement
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user