mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Palette editor : Fix blur delegation on Firefox
This commit is contained in:
parent
2fdc85556b
commit
011b07c735
@ -13,11 +13,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ns.HslRgbColorPicker.prototype.init = function () {
|
ns.HslRgbColorPicker.prototype.init = function () {
|
||||||
var isChromeOrFirefox = pskl.utils.UserAgent.isChrome || pskl.utils.UserAgent.isFirefox;
|
var isFirefox = pskl.utils.UserAgent.isFirefox;
|
||||||
var changeEvent = isChromeOrFirefox ? 'input' : 'change';
|
var isChrome = pskl.utils.UserAgent.isChrome;
|
||||||
|
|
||||||
|
var changeEvent = (isChrome || isFirefox) ? 'input' : 'change';
|
||||||
this.container.addEventListener(changeEvent, this.onPickerChange_.bind(this));
|
this.container.addEventListener(changeEvent, this.onPickerChange_.bind(this));
|
||||||
this.container.addEventListener('keydown', this.onKeydown_.bind(this));
|
this.container.addEventListener('keydown', this.onKeydown_.bind(this));
|
||||||
this.container.addEventListener('focusout', this.onBlur_.bind(this));
|
this.container.addEventListener('blur', this.onBlur_.bind(this), true);
|
||||||
|
|
||||||
this.spectrumEl = this.container.querySelector('.color-picker-spectrum');
|
this.spectrumEl = this.container.querySelector('.color-picker-spectrum');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user