From b687870a55eae43a71ea3adc41be0ab341a8721f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 8 Sep 2020 19:40:15 -0400 Subject: Delay hide option (#774) * Add hideDelay option * Add _clearSelection * Use hideDelay * Prevent repeated delayed selection clears * Fix popup hide timer being cleared when the cursor is moved into the frame --- ext/bg/js/options.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/bg/js') diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 9dc0c166..398fb95c 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -473,6 +473,7 @@ class OptionsUtil { // Options conditions converted to string representations. // Added usePopupWindow. // Updated handlebars templates to include "clipboard-image" definition. + // Added hideDelay. for (const {conditionGroups} of options.profiles) { for (const {conditions} of conditionGroups) { for (const condition of conditions) { @@ -487,6 +488,7 @@ class OptionsUtil { } for (const {options: profileOptions} of options.profiles) { profileOptions.general.usePopupWindow = false; + profileOptions.scanning.hideDelay = 0; } await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars'); return options; -- cgit v1.2.3