mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Palette Editor : Fix color change from hex input
This commit is contained in:
parent
7a8efc56b0
commit
2fdc85556b
@ -36,6 +36,9 @@
|
||||
this.spectrumEl = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle change event on all color inputs
|
||||
*/
|
||||
ns.HslRgbColorPicker.prototype.onPickerChange_ = function (evt) {
|
||||
var target = evt.target;
|
||||
if (target.dataset.dimension) {
|
||||
@ -47,6 +50,9 @@
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle up/down arrow keydown on text inputs
|
||||
*/
|
||||
ns.HslRgbColorPicker.prototype.onKeydown_ = function (evt) {
|
||||
var target = evt.target;
|
||||
|
||||
@ -90,7 +96,7 @@
|
||||
this.setColor(color);
|
||||
}
|
||||
} else if (model === 'hex') {
|
||||
if (/^#([a-f0-9]{3}) {1,2}$/i.test(value)) {
|
||||
if (/^#([a-f0-9]{3}){1,2}$/i.test(value)) {
|
||||
this.setColor(value);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user