summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-08 19:40:15 -0400
committerGitHub <noreply@github.com>2020-09-08 19:40:15 -0400
commitb687870a55eae43a71ea3adc41be0ab341a8721f (patch)
tree55b5046b6c2f9513edf09307c05cc50d3468ae67 /ext/bg/js
parentab4dbacc4c36d6373e22f758eefdb7514dc7cdb9 (diff)
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
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js2
1 files changed, 2 insertions, 0 deletions
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;