mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
Fix combobox autocomplete behavior for taginfo
This commit is contained in:
@@ -177,10 +177,9 @@ d3.combobox = function() {
|
||||
function autocomplete() {
|
||||
var v = value();
|
||||
|
||||
if (!v) {
|
||||
idx = -1;
|
||||
return;
|
||||
}
|
||||
idx = -1;
|
||||
|
||||
if (!v) return;
|
||||
|
||||
for (var i = 0; i < suggestions.length; i++) {
|
||||
if (suggestions[i].value.toLowerCase().indexOf(v.toLowerCase()) === 0) {
|
||||
|
||||
@@ -133,7 +133,7 @@ describe("d3.combobox", function() {
|
||||
});
|
||||
|
||||
it("does not select when value is not a prefix of any suggestion", function() {
|
||||
input.call(combobox.data(data));
|
||||
input.call(combobox.fetcher(function(_, cb) { cb(data); }));
|
||||
input.node().focus();
|
||||
simulateKeypress('c');
|
||||
simulateKeypress('a');
|
||||
|
||||
Reference in New Issue
Block a user