diff --git a/libs/designer-ui/src/lib/panel/panelResizer.tsx b/libs/designer-ui/src/lib/panel/panelResizer.tsx index 42df02a464a..ee202f19d70 100644 --- a/libs/designer-ui/src/lib/panel/panelResizer.tsx +++ b/libs/designer-ui/src/lib/panel/panelResizer.tsx @@ -37,7 +37,9 @@ export const PanelResizer = (props: PanelResizerProps): JSX.Element => { const animationFrame = useRef(0); const resize = useCallback( - ({ clientX }: MouseEvent) => { + (e: MouseEvent) => { + e.preventDefault(); + const { clientX } = e; animationFrame.current = requestAnimationFrame(() => { if (isResizing) { const newWidth = Math.max(window.innerWidth - clientX, 400); diff --git a/libs/designer/src/lib/core/index.ts b/libs/designer/src/lib/core/index.ts index 9d72e9971a5..d2156892087 100644 --- a/libs/designer/src/lib/core/index.ts +++ b/libs/designer/src/lib/core/index.ts @@ -69,4 +69,3 @@ export { getBrandColorFromManifest, getIconUriFromManifest, } from './utils/card'; -export { resetCustomCode } from './state/customcode/customcodeSlice'; diff --git a/libs/designer/src/lib/core/state/global.ts b/libs/designer/src/lib/core/state/global.ts index 79c9dafbafb..5f44f566fa5 100644 --- a/libs/designer/src/lib/core/state/global.ts +++ b/libs/designer/src/lib/core/state/global.ts @@ -1,3 +1,4 @@ +import { resetCustomCode } from './customcode/customcodeSlice'; import { useIsWorkflowDirty } from './workflow/workflowSelectors'; import { setIsWorkflowDirty } from './workflow/workflowSlice'; import { setIsWorkflowParametersDirty } from './workflowparameters/workflowparametersSlice'; @@ -17,4 +18,5 @@ export const resetDesignerDirtyState = createAsyncThunk('resetDesignerDirtyState const dispatch = thunkAPI.dispatch; dispatch(setIsWorkflowDirty(false)); dispatch(setIsWorkflowParametersDirty(false)); + dispatch(resetCustomCode()); }); diff --git a/libs/designer/src/lib/ui/panel/panelRoot.tsx b/libs/designer/src/lib/ui/panel/panelRoot.tsx index d1f3c069218..fe2990ffa72 100644 --- a/libs/designer/src/lib/ui/panel/panelRoot.tsx +++ b/libs/designer/src/lib/ui/panel/panelRoot.tsx @@ -84,7 +84,7 @@ export const PanelRoot = (props: PanelRootProps): JSX.Element => { className={`msla-panel-root-${currentPanelMode}`} isLightDismiss isBlocking={!isLoadingPanel && !nonBlockingPanels.includes(currentPanelMode ?? '')} - type={panelLocation === PanelLocation.Right ? PanelType.custom : PanelType.customNear} + type={commonPanelProps.panelLocation === PanelLocation.Right ? PanelType.custom : PanelType.customNear} isOpen={!collapsed} onDismiss={dismissPanel} hasCloseButton={false}