diff --git a/css/80_app.css b/css/80_app.css index e10e412ce..f8aeb054f 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -3941,7 +3941,7 @@ img.tile-debug { vertical-align: baseline; width: 11px; height: 11px; - fill: #fff; + color: #fff; } /* For text (e.g. upcoming events) */ diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index 0d66e27e4..93b0ae596 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -91,6 +91,7 @@ export function uiCombobox(context, klass) { function mouseup() { input.on('mouseup.combo-input', null); if (d3_event.button !== 0) return; // left click only + if (this !== document.activeElement) return; // exit if this input is not focused var start = input.property('selectionStart'); var end = input.property('selectionEnd'); @@ -98,11 +99,10 @@ export function uiCombobox(context, klass) { // not showing or showing for a different field - try to show it. var combo = container.selectAll('.combobox'); - if (combo.empty() || combo.datum() !== input) { + if (combo.empty() || combo.datum() !== input.node()) { var tOrig = _tDown; window.setTimeout(function() { if (tOrig !== _tDown) return; // exit if user double clicked - input.node().focus(); fetch('', function() { show(); render(); diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index 3f2adedcf..5b9cc57b5 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -286,11 +286,17 @@ export function uiRawTagEditor(context) { } if (kNew && kNew !== kOld) { - var match = kNew.match(/^(.*?)(?:_(\d+))?$/); - var base = match[1]; - var suffix = +(match[2] || 1); - while (_tags[kNew]) { // rename key if already in use - kNew = base + '_' + suffix++; + if (_tags[kNew] !== undefined) { // key is already in use + this.value = kOld; // clear it out + list.selectAll('input.value') + .each(function(d) { + if (d.key === kNew) { // send focus to that other value combo instead + var input = d3_select(this).node(); + input.focus(); + input.select(); + } + }); + return; } if (kNew.indexOf('=') !== -1) { diff --git a/package.json b/package.json index 5d06c3039..b9b4216e9 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "js-yaml": "^3.9.0", "json-stringify-pretty-compact": "^1.1.0", "jsonschema": "^1.1.0", - "mapillary-js": "2.15.0", + "mapillary-js": "2.16.0", "mapillary_sprite_source": "^1.7.0", "minimist": "^1.2.0", "mocha": "^5.0.0",