From 87ddfa68dc25e0057a329a836dba8f84c6929848 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 28 Jan 2019 11:20:32 -0500 Subject: [PATCH] Revert 55715a482 - caused raw_tag_editor combos to not blur in Safari --- modules/ui/combobox.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index cc98f4ca1..e8fc6484b 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -120,9 +120,6 @@ export function uiCombobox(context, klass) { function blur() { - // Try to dispatch accept here, but no guarantee - see note in `accept` - accept(null, true); // null = datum, true = onBlur - _comboHideTimerID = window.setTimeout(hide, 75); } @@ -399,7 +396,7 @@ export function uiCombobox(context, klass) { // Dispatches an 'accept' event // Then hides the combobox. - function accept(d, onBlur) { + function accept(d) { _cancelFetch = true; var thiz = input.node(); @@ -413,17 +410,6 @@ export function uiCombobox(context, klass) { thiz.setSelectionRange(val.length, val.length); d = _fetched[val]; - - // Try to dispatch `accept` onBlur, but only if we matched field to fetched datum. - // Surprisingly, this might happen: - // - user accepts a value in raw tag editor by pressing 'tab' - // - we dispatch `accept` - // - value change kicks off an event cascade *which replaces the combo* - // - 'tab' takes the user to the next field, blurring the current one - // - we get here, but the combo is new and has no datum yet - // - so just return because there's no reason to fire another `accept` with no datum - if (onBlur && !d) return; - dispatch.call('accept', thiz, d, val); hide(); }