fix colorpicker keyboard increment with #HEX in CAPS
This commit is contained in:
parent
80547aef70
commit
7c746ab9a3
|
@ -378,7 +378,7 @@ CodeMirror.defineExtension('colorpicker', function () {
|
||||||
if (currentFormat === 'hex') {
|
if (currentFormat === 'hex') {
|
||||||
value = el.value.trim();
|
value = el.value.trim();
|
||||||
const isShort = value.length <= 5;
|
const isShort = value.length <= 5;
|
||||||
const [r, g, b, a = ''] = el.value.match(isShort ? /[\da-f]/g : /[\da-f]{2}/g);
|
const [r, g, b, a = ''] = el.value.match(isShort ? /[\da-f]/gi : /[\da-f]{2}/gi);
|
||||||
let ceiling, data;
|
let ceiling, data;
|
||||||
if (!ctrl && !shift && !alt) {
|
if (!ctrl && !shift && !alt) {
|
||||||
ceiling = isShort ? 0xFFF : 0xFFFFFF;
|
ceiling = isShort ? 0xFFF : 0xFFFFFF;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user