Skip to content

Commit

Permalink
fix(editor): 源代码编辑器保存快捷键阻止冒泡
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen authored and jia000 committed May 24, 2022
1 parent 359fc5f commit 2134d92
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/editor/src/layouts/CodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default defineComponent({
codeEditor.value.addEventListener('keydown', (e) => {
if (e.keyCode === 83 && (navigator.platform.match('Mac') ? e.metaKey : e.ctrlKey)) {
e.preventDefault();
e.stopPropagation();
emit('save', getEditorValue());
}
});
Expand Down

0 comments on commit 2134d92

Please sign in to comment.