From 8139ca7a48b90667a73ff380944235e9d5093ca2 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 16 Dec 2015 21:33:53 -0500 Subject: [PATCH] Return should accept input and return to browse mode (closes #2380) --- 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 9b6ce2db6..db821f137 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -145,6 +145,10 @@ iD.modes.Select = function(context, selectedIDs) { } } + function ret() { + context.enter(iD.modes.Browse(context)); + } + behaviors.forEach(function(behavior) { context.install(behavior); @@ -157,7 +161,8 @@ iD.modes.Select = function(context, selectedIDs) { operations.unshift(iD.operations.Delete(selectedIDs, context)); keybinding - .on('⎋', function() { context.enter(iD.modes.Browse(context)); }, true) + .on('⎋', ret, true) + .on('↩', ret, true) .on('space', toggleMenu); operations.forEach(function(operation) {