diff --git a/app/scripts/views/settings/settings-shortcuts-view.js b/app/scripts/views/settings/settings-shortcuts-view.js index fa244811..ddfa3b54 100644 --- a/app/scripts/views/settings/settings-shortcuts-view.js +++ b/app/scripts/views/settings/settings-shortcuts-view.js @@ -53,7 +53,15 @@ class SettingsShortcutsView extends View { shortcutClick(e) { const globalShortcutType = e.target.dataset.shortcut; - const shortcutEditor = $('
').addClass('shortcut__editor'); + const existing = $(`.shortcut__editor[data-shortcut=${globalShortcutType}]`); + if (existing.length) { + existing.remove(); + return; + } + + const shortcutEditor = $('
') + .addClass('shortcut__editor') + .attr('data-shortcut', globalShortcutType); $('
') .text(Locale.setShEdit) .appendTo(shortcutEditor); diff --git a/release-notes.md b/release-notes.md index 0ba631cc..bfe05c11 100644 --- a/release-notes.md +++ b/release-notes.md @@ -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