don't reinsert reinterpreted color on start
do it only on the Enter key or once the user explicitly changed the color at least once
This commit is contained in:
parent
e0ea76a940
commit
0ed6e3d4bf
|
@ -330,8 +330,8 @@ CodeMirror.defineExtension('colorpicker', function () {
|
|||
setFromInputs();
|
||||
}
|
||||
|
||||
function setFromInputs() {
|
||||
userActivity = performance.now();
|
||||
function setFromInputs(event) {
|
||||
userActivity = event ? performance.now() : userActivity;
|
||||
if ($inputs[currentFormat].every(validateInput)) {
|
||||
setFromColor($inputs.color);
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ CodeMirror.defineExtension('colorpicker', function () {
|
|||
if (!e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
||||
switch (e.which) {
|
||||
case 13:
|
||||
setFromInputs();
|
||||
setFromInputs({});
|
||||
colorpickerCallback();
|
||||
// fallthrough to 27
|
||||
case 27:
|
||||
|
|
Loading…
Reference in New Issue
Block a user