mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-28 22:56:31 +02:00
Enter should only accept changes if focused on a non-search input field.
(closes #2912)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user