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:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user