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:
Quincy Morgan
2019-01-17 15:42:35 -05:00
parent bb4d0a9282
commit 77cfde7913

View File

@@ -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() {