0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Move focus method to handleViewChange

This commit is contained in:
Gazook89
2024-09-03 14:48:45 -05:00
parent afa1e7974a
commit 3c6f49aa0a

View File

@@ -82,7 +82,6 @@ const Editor = createClass({
if(prevProps.moveSource !== this.props.moveSource) {
this.sourceJump();
};
this.codeEditor.current?.codeMirror.focus();
},
handleControlKeys : function(e){
@@ -114,7 +113,10 @@ const Editor = createClass({
this.props.setMoveArrows(newView === 'text');
this.setState({
view : newView
}, this.updateEditorSize); //TODO: not sure if updateeditorsize needed
}, ()=>{
this.codeEditor.current?.codeMirror.focus();
this.updateEditorSize();
}); //TODO: not sure if updateeditorsize needed
},
getCurrentPage : function(){