Resolve alphaPïcker issue and clean package.json

This commit is contained in:
MrTimscampi 2020-07-25 23:38:42 +02:00
parent b7d2561dae
commit 4709e76b5a
2 changed files with 5 additions and 5 deletions

View File

@ -109,7 +109,6 @@
"src/components/displaySettings/displaySettings.js",
"src/components/fetchhelper.js",
"src/components/filterdialog/filterdialog.js",
"src/components/filterdialog/filterdialog.js",
"src/components/groupedcards.js",
"src/components/homeScreenSettings/homeScreenSettings.js",
"src/components/homesections/homesections.js",

View File

@ -108,6 +108,7 @@ import 'material-icons';
export class AlphaPicker {
constructor(options) {
const self = this;
this.options = options;
@ -120,18 +121,18 @@ import 'material-icons';
function onItemFocusTimeout() {
itemFocusTimeout = null;
this.value(itemFocusValue);
self.value(itemFocusValue);
}
let alphaFocusedElement;
let alphaFocusTimeout;
function onAlphaFocusTimeout(instance) {
function onAlphaFocusTimeout() {
alphaFocusTimeout = null;
if (document.activeElement === alphaFocusedElement) {
const value = alphaFocusedElement.getAttribute('data-value');
instance.value(value, true);
self.value(value, true);
}
}
@ -176,7 +177,7 @@ import 'material-icons';
if (alphaPickerButton) {
alphaFocusedElement = alphaPickerButton;
alphaFocusTimeout = setTimeout(onAlphaFocusTimeout.bind(null, this), 600);
alphaFocusTimeout = setTimeout(onAlphaFocusTimeout, 600);
}
}