From 7aecdda913daabbdb7f188c41fcf56012583542b Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 28 Sep 2015 17:02:54 -0400 Subject: [PATCH] Enter should only accept changes if focused on a non-search input field. (closes #2912) --- js/id/modes/select.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/id/modes/select.js b/js/id/modes/select.js index 56e93988e..985ccd22c 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -148,7 +148,12 @@ iD.modes.Select = function(context, selectedIDs) { function ret() { if (!context.inIntro()) { - context.enter(iD.modes.Browse(context)); + // only accept changes if focused on a non-search input field.. #2912, #2380 + var el = document.activeElement, + tagName = el && el.tagName.toLowerCase(); + if (tagName === 'input' && el.type !== 'search') { + context.enter(iD.modes.Browse(context)); + } } }