disallow Space as a colorpicker hotkey

This commit is contained in:
tophf 2017-11-23 13:20:39 +03:00
parent d2826d92f6
commit 8bff4a297e

View File

@ -79,7 +79,7 @@ window.initColorpicker = () => {
if (key === 'Enter' || key === 'Esc') {
$('#help-popup .dismiss').onclick();
return;
} else if (/^((Shift-)?(Esc|Tab|[!-~])|(Shift-?|Ctrl-?|Alt-?|Cmd-?)*)$/.test(key)) {
} else if (/^(Space|(Shift-)?(Esc|Tab|[!-~])|(Shift-?|Ctrl-?|Alt-?|Cmd-?)*)$/.test(key)) {
this.setCustomValidity('Not allowed');
} else {
this.setCustomValidity('');