Skip to content

Commit

Permalink
Disable the import command once the modal is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed May 1, 2019
1 parent 6306f45 commit dc86aac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/openImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default (editor, config) => {
modal.setContent(container);
const cnt = typeof importCnt == 'function' ? importCnt(editor) : importCnt;
codeViewer.setContent(cnt || '');
modal.open();
modal.open().getModel()
.once('change:open', () => editor.stopCommand(this.id));
viewerEditor.refresh();
},

Expand Down

0 comments on commit dc86aac

Please sign in to comment.