diff --git a/css/80_app.css b/css/80_app.css index 1efee8c7d..89e53d976 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -1906,6 +1906,7 @@ div.combobox { margin-left: -30px; vertical-align: top; cursor: pointer; + pointer-events: none; } [dir='rtl'] .combobox-caret { margin-left: 0; diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index f8f6f8779..6a2e0174a 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -49,9 +49,9 @@ export function uiCombobox(context, klass) { .on('keydown.typeahead', keydown) .on('keyup.typeahead', keyup) .on('input.typeahead', change) + .on('mousedown', mousedown) .each(addCaret); - function addCaret() { var parent = this.parentNode; var sibling = this.nextSibling; @@ -65,22 +65,6 @@ export function uiCombobox(context, klass) { .attr('class', 'combobox-caret') .merge(caret); - caret - .on('mousedown', function () { - // prevent the form element from blurring. it blurs on mousedown - d3_event.stopPropagation(); - d3_event.preventDefault(); - var combo = container.selectAll('.combobox'); - if (combo.empty()) { - input.node().focus(); - fetch('', function() { - show(); - render(); - }); - } else { - hide(); - } - }); } @@ -205,6 +189,22 @@ export function uiCombobox(context, klass) { } + function mousedown() { + // prevent the form element from blurring. it blurs on mousedown + d3_event.stopPropagation(); + d3_event.preventDefault(); + var combo = container.selectAll('.combobox'); + if (combo.empty()) { + input.node().focus(); + fetch('', function() { + show(); + render(); + }); + } else { + hide(); + } + } + function nav(dir) { if (!_suggestions.length) return; diff --git a/modules/ui/inspector.js b/modules/ui/inspector.js index e167ee41e..ccb415077 100644 --- a/modules/ui/inspector.js +++ b/modules/ui/inspector.js @@ -46,9 +46,10 @@ export function uiInspector(context) { var entity = context.entity(_entityID); - var isTaglessVertex = entity.geometry(context.graph()) === 'vertex' && !entity.hasNonGeometryTags(); - // start with the preset list if the feature is new or is a vertex with no tags - var showPresetList = newFeature || isTaglessVertex; + var isTaglessOrIntersectionVertex = entity.geometry(context.graph()) === 'vertex' && + (!entity.hasNonGeometryTags() && !entity.isHighwayIntersection(context.graph())); + // start with the preset list if the feature is new or is an uninteresting vertex + var showPresetList = newFeature || isTaglessOrIntersectionVertex; if (showPresetList) { wrap.style('right', '-100%'); diff --git a/modules/ui/raw_member_editor.js b/modules/ui/raw_member_editor.js index 2689715c5..a6b52f60c 100644 --- a/modules/ui/raw_member_editor.js +++ b/modules/ui/raw_member_editor.js @@ -81,6 +81,8 @@ export function uiRawMemberEditor(context) { if (!context.hasEntity(d.relation.id)) { context.enter(modeBrowse(context)); } + + utilHighlightEntity(d.id, false, context); } diff --git a/test/spec/ui/combobox.js b/test/spec/ui/combobox.js index 48953282a..a48a62ac5 100644 --- a/test/spec/ui/combobox.js +++ b/test/spec/ui/combobox.js @@ -90,7 +90,7 @@ describe('uiCombobox', function() { it('adds combobox under container', function() { input.call(combobox.data(data)); - body.selectAll('.combobox-caret').dispatch('mousedown'); + body.selectAll('.combobox-input').dispatch('mousedown'); expect(d3.select('.id-container > div.combobox').nodes().length).to.equal(1); }); @@ -106,14 +106,14 @@ describe('uiCombobox', function() { it('shows all entries when clicking on the caret', function() { input.property('value', 'foobar').call(combobox.data(data)); - body.selectAll('.combobox-caret').dispatch('mousedown'); + body.selectAll('.combobox-input').dispatch('mousedown'); expect(body.selectAll('.combobox-option').size()).to.equal(5); expect(body.selectAll('.combobox-option').text()).to.equal('foobar'); }); it('is initially shown with no selection', function() { input.call(combobox.data(data)); - body.selectAll('.combobox-caret').dispatch('mousedown'); + body.selectAll('.combobox-input').dispatch('mousedown'); expect(body.selectAll('.combobox-option.selected').size()).to.equal(0); });