1
0
mirror of synced 2026-03-23 02:58:34 +08:00

fix(editor): 源代码编辑器保存快捷键阻止冒泡

This commit is contained in:
roymondchen
2022-05-24 19:43:55 +08:00
committed by jia000
parent 359fc5fdc6
commit 2134d92d54

View File

@@ -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());
}
});