mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Fixed an issue where the cycleway field would throw an error when added from the "Add field:" dropdown
This commit is contained in:
@@ -8,7 +8,7 @@ import { utilGetSetValue, utilNoAuto, utilRebind } from '../../util';
|
||||
export function uiFieldCycleway(field, context) {
|
||||
var dispatch = d3_dispatch('change');
|
||||
var items = d3_select(null);
|
||||
|
||||
var wrap = d3_select(null);
|
||||
|
||||
function cycleway(selection) {
|
||||
|
||||
@@ -17,7 +17,7 @@ export function uiFieldCycleway(field, context) {
|
||||
}
|
||||
|
||||
|
||||
var wrap = selection.selectAll('.form-field-input-wrap')
|
||||
wrap = selection.selectAll('.form-field-input-wrap')
|
||||
.data([0]);
|
||||
|
||||
wrap = wrap.enter()
|
||||
@@ -122,8 +122,8 @@ export function uiFieldCycleway(field, context) {
|
||||
|
||||
|
||||
cycleway.focus = function() {
|
||||
items.selectAll('.preset-input-cycleway')
|
||||
.node().focus();
|
||||
var node = wrap.selectAll('input').node();
|
||||
if (node) node.focus();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user