From a363f5175fa7803c6385c1a2d8db7b27949d7628 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Thu, 7 Feb 2019 15:56:49 -0500 Subject: [PATCH] Fix tabbing beyond last row of raw tag editor in Firefox (closes #5847) - removed the stopPropagation from the combobox keydown handler to make sure that the raw_tag_editor keydown handler will run - increased timeout from 1ms to 10ms for Firefox This is related to Firefox's newish time budgeting approach that they started using around Firefox 55. As a result, very fast timers (<4ms?) may run synchronously instead of yielding and running asynchronously https://blog.wanderview.com/blog/2017/03/13/firefox-52-settimeout-changes/ (note similar code in ui/fields/combo.js to delay focus changes and redraws 10ms after the tag changes and other events have completed) --- modules/ui/combobox.js | 1 - modules/ui/raw_tag_editor.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index 93b0ae596..def5e1fed 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -177,7 +177,6 @@ export function uiCombobox(context, klass) { break; case 9: // ⇥ Tab - d3_event.stopPropagation(); accept(); break; diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index e4e358262..47069e159 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -366,7 +366,7 @@ export function uiRawTagEditor(context) { _showBlank = true; content(wrap); list.selectAll('li:last-child input.key').node().focus(); - }, 1); + }, 10); } }