generalize can-close-on-esc
This commit is contained in:
parent
669fb443a9
commit
a35405500e
|
@ -214,11 +214,11 @@
|
|||
</template>
|
||||
|
||||
<template data-id="keymapHelp">
|
||||
<table class="keymap-list">
|
||||
<table class="keymap-list can-close-on-esc">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input i18n-placeholder="helpKeyMapHotkey" type="search" class="can-close-on-esc"></th>
|
||||
<th><input i18n-placeholder="helpKeyMapCommand" type="search" class="can-close-on-esc" spellcheck="false"></th>
|
||||
<th><input i18n-placeholder="helpKeyMapHotkey" type="search"></th>
|
||||
<th><input i18n-placeholder="helpKeyMapCommand" type="search"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -231,7 +231,7 @@
|
|||
</template>
|
||||
|
||||
<template data-id="styleSettings">
|
||||
<fieldset class="style-settings" disabled>
|
||||
<fieldset class="style-settings can-close-on-esc">
|
||||
<!-- <label class="style-origin">
|
||||
<span class="form-label" i18n-text="styleOriginLabel"></span>
|
||||
<input id="styleOrigin" type="text">
|
||||
|
|
|
@ -31,8 +31,10 @@ const helpPopup = {
|
|||
getEventKeyName(event) === 'Escape' &&
|
||||
!$('.CodeMirror-hints, #message-box') && (
|
||||
!document.activeElement ||
|
||||
!document.activeElement.closest('#search-replace-dialog') &&
|
||||
document.activeElement.matches(':not(input), .can-close-on-esc')
|
||||
!document.activeElement.closest('#search-replace-dialog') && (
|
||||
document.activeElement.tagName !== 'INPUT' ||
|
||||
document.activeElement.closest('.can-close-on-esc')
|
||||
)
|
||||
)
|
||||
);
|
||||
const div = $('#help-popup');
|
||||
|
|
Loading…
Reference in New Issue
Block a user