fix: mobile view on editor (#13136)

This commit is contained in:
vjaris42 2025-07-01 16:14:12 +05:30 committed by GitHub
parent 58c5c727f4
commit ba5c1eff05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -136,7 +136,7 @@ export const HotkeyProvider = ({ children, mode, currentLayout, canvasMaxWidth }
style={{
width: currentLayout == 'mobile' ? '450px' : '100%',
maxWidth: canvasMaxWidth,
// margin: '0 auto',
margin: '0 auto',
transform: 'translateZ(0)',
}}
>

View file

@ -1570,7 +1570,8 @@ export const createComponentsSlice = (set, get) => ({
const currentPageId = getCurrentPageId(moduleId);
set(
(state) => {
state.modules[moduleId].pages[state.currentPageIndex].autoComputeLayout = false;
const currentPageIndex = state.modules[moduleId].pages.findIndex((page) => page.id === currentPageId);
state.modules[moduleId].pages[currentPageIndex].autoComputeLayout = false;
},
false,
'turnOffAutoComputeLayout'