Revert "Change: hide colorpicker on click"
This reverts commit aef4589916
.
This commit is contained in:
parent
e498105521
commit
f7fa4d5b5a
|
@ -178,8 +178,6 @@
|
|||
|
||||
HUE_COLORS.forEach(color => Object.assign(color, stringToColor(color.hex)));
|
||||
|
||||
$root.tabIndex = 0;
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
|
@ -554,7 +552,7 @@
|
|||
function onMouseUp(event) {
|
||||
if (releaseMouse(event, ['saturation', 'hue', 'opacity']) &&
|
||||
!event.target.closest('.codemirror-colorview, .colorpicker-popup, .CodeMirror')) {
|
||||
// hide();
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -606,14 +604,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
setTimeout(() => {
|
||||
if (!document.activeElement.closest('.colorpicker-popup')) {
|
||||
hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//endregion
|
||||
//region Event utilities
|
||||
|
||||
|
@ -671,7 +661,6 @@
|
|||
function registerEvents() {
|
||||
window.addEventListener('keydown', onKeyDown, true);
|
||||
window.addEventListener('close-colorpicker-popup', onCloseRequest, true);
|
||||
window.addEventListener('click', onClick);
|
||||
$root.addEventListener('mouseleave', snooze);
|
||||
$root.addEventListener('mouseenter', stopSnoozing);
|
||||
$root.addEventListener('input', setFromInputs);
|
||||
|
@ -693,7 +682,6 @@
|
|||
function unregisterEvents() {
|
||||
window.removeEventListener('keydown', onKeyDown, true);
|
||||
window.removeEventListener('close-colorpicker-popup', hide, true);
|
||||
window.removeEventListener('click', onClick);
|
||||
$root.removeEventListener('mouseleave', snooze);
|
||||
$root.removeEventListener('mouseenter', stopSnoozing);
|
||||
$root.removeEventListener('input', setFromInputs);
|
||||
|
|
Loading…
Reference in New Issue
Block a user