Enter should only accept changes if focused on a non-search input field.

(closes #2912)
This commit is contained in:
Bryan Housel
2015-09-28 17:02:54 -04:00
parent a3dc4477f6
commit 7aecdda913
+6 -1
View File
@@ -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));
}
}
}