mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Set title attribute for tag keys/values, ensure combo options have title
This will show values as hover tooltips, in case the field is too narrow and the value is cut off. (closes #3054)
This commit is contained in:
@@ -44,12 +44,17 @@ iD.services.taginfo = function() {
|
||||
return function(d) { return parseFloat(d.fraction) > 0.01 || d.in_wiki; };
|
||||
}
|
||||
|
||||
function valKey(d) { return { value: d.key }; }
|
||||
function valKey(d) {
|
||||
return {
|
||||
value: d.key,
|
||||
title: d.key
|
||||
};
|
||||
}
|
||||
|
||||
function valKeyDescription(d) {
|
||||
return {
|
||||
value: d.value,
|
||||
title: d.description
|
||||
title: d.description || d.value
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -100,11 +100,13 @@ iD.ui.RawTagEditor = function(context) {
|
||||
});
|
||||
|
||||
$items.select('input.key')
|
||||
.attr('title', function(d) { return d.key; })
|
||||
.value(function(d) { return d.key; })
|
||||
.on('blur', keyChange)
|
||||
.on('change', keyChange);
|
||||
|
||||
$items.select('input.value')
|
||||
.attr('title', function(d) { return d.value; })
|
||||
.value(function(d) { return d.value; })
|
||||
.on('blur', valueChange)
|
||||
.on('change', valueChange)
|
||||
|
||||
Reference in New Issue
Block a user