From 4709e76b5a642c60c92bdf1ea2235a2483b463ff Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Sat, 25 Jul 2020 23:38:42 +0200 Subject: [PATCH] =?UTF-8?q?Resolve=20alphaP=C3=AFcker=20issue=20and=20clea?= =?UTF-8?q?n=20package.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/components/alphaPicker/alphaPicker.js | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1a716bb3c2..1f2ead24dc 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/alphaPicker/alphaPicker.js b/src/components/alphaPicker/alphaPicker.js index afdee97603..4bc8af56f0 100644 --- a/src/components/alphaPicker/alphaPicker.js +++ b/src/components/alphaPicker/alphaPicker.js @@ -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); } }