fix #1324: duplicated shortcut editor in settings

This commit is contained in:
antelle 2019-10-27 09:10:00 +01:00
parent 3e1f1e557e
commit 0fce37cc73
2 changed files with 12 additions and 1 deletions

View File

@ -53,7 +53,15 @@ class SettingsShortcutsView extends View {
shortcutClick(e) {
const globalShortcutType = e.target.dataset.shortcut;
const shortcutEditor = $('<div/>').addClass('shortcut__editor');
const existing = $(`.shortcut__editor[data-shortcut=${globalShortcutType}]`);
if (existing.length) {
existing.remove();
return;
}
const shortcutEditor = $('<div/>')
.addClass('shortcut__editor')
.attr('data-shortcut', globalShortcutType);
$('<div/>')
.text(Locale.setShEdit)
.appendTo(shortcutEditor);

View File

@ -1,5 +1,8 @@
Release notes
-------------
##### v1.12.1 (2019-10-27)
`-` fix #1324: duplicated shortcut editor in settings
##### v1.12.0 (2019-10-26)
`-` #1022: fuzzy search
`+` #1108: setting for running in an iframe