Skip to content
Snippets Groups Projects
Commit ceedd632 authored by chris's avatar chris
Browse files

autofocus fix

parent 4856bcd1
No related branches found
No related tags found
1 merge request!407Hhmi fixes
...@@ -47,7 +47,7 @@ const Wrapper = styled.div` ...@@ -47,7 +47,7 @@ const Wrapper = styled.div`
const Main = styled.div` const Main = styled.div`
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
height: calc(100% - 40px); height: 100%;
`; `;
const TopMenu = styled.div` const TopMenu = styled.div`
......
...@@ -102,12 +102,7 @@ const WaxView = forwardRef((props, ref) => { ...@@ -102,12 +102,7 @@ const WaxView = forwardRef((props, ref) => {
'main', 'main',
); );
if (debug) applyDevTools(view); if (debug) applyDevTools(view);
if (autoFocus && view) if (autoFocus && view) view.focus();
setTimeout(() => {
view.focus();
view.state.tr.insertText('', 0);
view.dispatch(view.state.tr);
}, 500);
return () => view.destroy(); return () => view.destroy();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment