From 77a9dde6f724e55a9aa56bc5ed48f78c9b69a027 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 5 Dec 2018 15:59:06 -0500 Subject: [PATCH] Make sure combobox can always receive arrow and esc events --- modules/modes/select.js | 1 + modules/modes/select_data.js | 1 + modules/modes/select_note.js | 1 + modules/ui/init.js | 1 + 4 files changed, 4 insertions(+) diff --git a/modules/modes/select.js b/modules/modes/select.js index add5b6479..ff6e93191 100644 --- a/modules/modes/select.js +++ b/modules/modes/select.js @@ -305,6 +305,7 @@ export function modeSelect(context, selectedIDs) { function esc() { + if (d3_select('.combobox').size()) return; context.enter(modeBrowse(context)); } diff --git a/modules/modes/select_data.js b/modules/modes/select_data.js index fa1e413c7..de9b6513e 100644 --- a/modules/modes/select_data.js +++ b/modules/modes/select_data.js @@ -56,6 +56,7 @@ export function modeSelectData(context, selectedDatum) { function esc() { + if (d3_select('.combobox').size()) return; context.enter(modeBrowse(context)); } diff --git a/modules/modes/select_note.js b/modules/modes/select_note.js index f2dcc3835..4e5fd5d15 100644 --- a/modules/modes/select_note.js +++ b/modules/modes/select_note.js @@ -78,6 +78,7 @@ export function modeSelectNote(context, selectedNoteID) { function esc() { + if (d3_select('.combobox').size()) return; context.enter(modeBrowse(context)); } diff --git a/modules/ui/init.js b/modules/ui/init.js index cbea59be1..29d4defaa 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -347,6 +347,7 @@ export function uiInit(context) { function pan(d) { return function() { + if (d3_select('.combobox').size()) return; d3_event.preventDefault(); context.pan(d, 100); };