remove the no longer used defocusEditor command

This commit is contained in:
tophf 2017-12-22 18:35:46 +03:00
parent d6c595d94e
commit a249167539
2 changed files with 3 additions and 7 deletions

View File

@ -138,7 +138,7 @@
<a data-action="next" i18n-title="genericNext" href="#" data-hotkey-tooltip="findNext">
<svg class="svg-icon"><use xlink:href="#svg-icon-v"/></svg>
</a>
<a data-action="close" i18n-title="confirmClose" href="#" data-hotkey-tooltip="defocusEditor">
<a data-action="close" i18n-title="confirmClose" href="#" data-hotkey-tooltip="=Esc">
<svg class="svg-icon dismiss"><use xlink:href="#svg-icon-close"/></svg>
</a>
</div>

View File

@ -13,7 +13,6 @@ onDOMscriptReady('/codemirror.js').then(() => {
save,
toggleStyle,
jumpToLine,
defocusEditor,
nextEditor, prevEditor,
};
// reroute handling to nearest editor when keypress resolves to one of these commands
@ -149,10 +148,6 @@ onDOMscriptReady('/codemirror.js').then(() => {
return this.display.wrapper.parentNode;
}
function defocusEditor(cm) {
cm.display.input.blur();
}
function nextEditor(cm) {
return nextPrevEditor(cm, 1);
}
@ -513,7 +508,8 @@ onDOMscriptReady('/codemirror.js').then(() => {
el._hotkeyTooltipKeyMap = mapName;
const title = el._hotkeyTooltipTitle = el._hotkeyTooltipTitle || el.title;
const cmd = el.dataset.hotkeyTooltip;
const key = findKeyForCommand(cmd, mapName) ||
const key = cmd[0] === '=' ? cmd.slice(1) :
findKeyForCommand(cmd, mapName) ||
extraKeys && findKeyForCommand(cmd, extraKeys);
const newTitle = title + (title && key ? '\n' : '') + (key || '');
if (el.title !== newTitle) el.title = newTitle;