Compare commits

...

2 Commits

Author SHA1 Message Date
David Luzar
b660478164 fix: prevent translation of excalidraw container (#10389) 2025-11-22 16:16:30 +01:00
gothamsidd
37882c66cb fix: canvas panning stops when hovering over frame title (#10340) (#10351)
* fix: canvas panning stops when hovering over frame title (#10340)

* improve

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-11-18 09:24:02 +00:00
2 changed files with 7 additions and 3 deletions

View File

@@ -105,6 +105,7 @@ export const CLASSES = {
SEARCH_MENU_INPUT_WRAPPER: "layer-ui__search-inputWrapper",
CONVERT_ELEMENT_TYPE_POPUP: "ConvertElementTypePopup",
SHAPE_ACTIONS_THEME_SCOPE: "shape-actions-theme-scope",
FRAME_NAME: "frame-name",
};
export const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";

View File

@@ -1476,6 +1476,7 @@ class App extends React.Component<AppProps, AppState> {
return (
<div
id={this.getFrameNameDOMId(f)}
className={CLASSES.FRAME_NAME}
key={f.id}
style={{
position: "absolute",
@@ -1574,7 +1575,8 @@ class App extends React.Component<AppProps, AppState> {
return (
<div
className={clsx("excalidraw excalidraw-container", {
translate="no"
className={clsx("excalidraw excalidraw-container notranslate", {
"excalidraw--view-mode":
this.state.viewModeEnabled ||
this.state.openDialog?.name === "elementLinkSelector",
@@ -11252,12 +11254,13 @@ class App extends React.Component<AppProps, AppState> {
(
event: WheelEvent | React.WheelEvent<HTMLDivElement | HTMLCanvasElement>,
) => {
// if not scrolling on canvas/wysiwyg, ignore
if (
!(
event.target instanceof HTMLCanvasElement ||
event.target instanceof HTMLTextAreaElement ||
event.target instanceof HTMLIFrameElement
event.target instanceof HTMLIFrameElement ||
(event.target instanceof HTMLElement &&
event.target.classList.contains(CLASSES.FRAME_NAME))
)
) {
// prevent zooming the browser (but allow scrolling DOM)