mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 08:50:32 +02:00
combo, multiCombo, and semiCombo fields now correctly submit the typed value upon pressing enter/return without deselecting the feature (closes #5725)
This commit is contained in:
@@ -323,6 +323,16 @@ export function uiFieldCombo(field, context) {
|
||||
.on('change', change)
|
||||
.on('blur', change);
|
||||
|
||||
input
|
||||
.on('keydown.field', function() {
|
||||
switch (d3_event.keyCode) {
|
||||
case 13: // ↩ Return
|
||||
input.node().blur(); // blurring also enters the value
|
||||
d3_event.stopPropagation();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
if (isMulti || isSemi) {
|
||||
combobox
|
||||
.on('accept', function() {
|
||||
|
||||
Reference in New Issue
Block a user