迁移全局弹窗键盘事件
This commit is contained in:
@@ -220,15 +220,4 @@
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
// prompt 模式支持按 Enter 确认、Esc 取消
|
||||
document.getElementById('global-dialog-input').addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
window.chatDialog._confirm();
|
||||
} else if (e.key === 'Escape') {
|
||||
e.preventDefault();
|
||||
window.chatDialog._cancel();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user