From 640730d38b55a22549465aada141475897619433 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 6 Feb 2019 10:26:14 -0500 Subject: [PATCH 1/3] Change focus to existing key instead of suffixing it with _1 (re: #3625, re: #2896) --- modules/ui/combobox.js | 4 ++-- modules/ui/raw_tag_editor.js | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) 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) { From d958844bc02139997b47d43f17c6dcbe74a6ead5 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 5 Feb 2019 20:28:29 +0000 Subject: [PATCH 2/3] chore(package): update mapillary-js to version 2.16.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 601524c47c7197561281b855e61b013779e671cd Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 6 Feb 2019 11:54:45 -0500 Subject: [PATCH 3/3] Use `color` instead of `fill` for the badge icon re: 7fe0380d7 Now that the icons are all using `fill=currentColor` this is the way to do it --- css/80_app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/80_app.css b/css/80_app.css index d549333d5..df759735d 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -3822,7 +3822,7 @@ img.tile-debug { vertical-align: baseline; width: 11px; height: 11px; - fill: #fff; + color: #fff; } /* For text (e.g. upcoming events) */