Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 19a5e0bf86 | |||
| 42fe6c2632 | |||
| 1098a0b909 | |||
| c78e4aab7f |
@@ -20,7 +20,6 @@ import {
|
||||
APP_NAME,
|
||||
EVENT,
|
||||
THEME,
|
||||
TITLE_TIMEOUT,
|
||||
VERSION_TIMEOUT,
|
||||
debounce,
|
||||
getVersion,
|
||||
@@ -499,11 +498,6 @@ const ExcalidrawWrapper = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const titleTimeout = setTimeout(
|
||||
() => (document.title = APP_NAME),
|
||||
TITLE_TIMEOUT,
|
||||
);
|
||||
|
||||
const syncData = debounce(() => {
|
||||
if (isTestEnv()) {
|
||||
return;
|
||||
@@ -594,7 +588,6 @@ const ExcalidrawWrapper = () => {
|
||||
visibilityChange,
|
||||
false,
|
||||
);
|
||||
clearTimeout(titleTimeout);
|
||||
};
|
||||
}, [isCollabDisabled, collabAPI, excalidrawAPI, setLangCode]);
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>
|
||||
Free, collaborative whiteboard • Hand-drawn look & feel | Excalidraw
|
||||
</title>
|
||||
<title>Excalidraw Whiteboard</title>
|
||||
<meta
|
||||
name="viewport"
|
||||
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.UNLOAD, this.onUnload, false),
|
||||
addEventListener(window, EVENT.BLUR, this.onBlur, false),
|
||||
addEventListener(
|
||||
this.excalidrawContainerRef.current,
|
||||
EVENT.WHEEL,
|
||||
this.handleWheel,
|
||||
{ passive: false },
|
||||
),
|
||||
addEventListener(
|
||||
this.excalidrawContainerRef.current,
|
||||
EVENT.DRAG_OVER,
|
||||
@@ -11165,9 +11159,20 @@ class App extends React.Component<AppProps, AppState> {
|
||||
event: WheelEvent | React.WheelEvent<HTMLDivElement | HTMLCanvasElement>,
|
||||
) => {
|
||||
// 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 (
|
||||
!(
|
||||
event.target instanceof HTMLCanvasElement ||
|
||||
isOnExcalidrawCanvas ||
|
||||
event.target instanceof HTMLTextAreaElement ||
|
||||
event.target instanceof HTMLIFrameElement
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user