Compare commits

...

4 Commits

Author SHA1 Message Date
zsviczian 19a5e0bf86 a more robust check 2025-08-20 19:36:26 +02:00
zsviczian 42fe6c2632 Update App.tsx 2025-08-20 19:17:02 +02:00
zsviczian 1098a0b909 check for activeEmbeddable in handleWheel 2025-08-20 18:59:52 +02:00
David Luzar c78e4aab7f chore: tweak title & remove timeout (#9883) 2025-08-20 14:09:20 +02:00
3 changed files with 13 additions and 17 deletions
-7
View File
@@ -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]);
+1 -3
View File
@@ -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"
+12 -7
View File
@@ -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
)