mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Work around blur issue for #439
This commit is contained in:
@@ -293,6 +293,13 @@ webkit doesn't let querySelectorAll select camelcase elements:
|
||||
* https://bugs.webkit.org/show_bug.cgi?id=83438
|
||||
* https://github.com/mbostock/d3/issues/925
|
||||
|
||||
Firefox does not fire a `blur` event when an element is removed from the DOM,
|
||||
unlike WebKit browsers.
|
||||
|
||||
Firefox does not support [the focusout event](https://bugzilla.mozilla.org/show_bug.cgi?id=687787).
|
||||
|
||||
Opera does not support `pointer-events` on HTML elements, only SVG elements.
|
||||
|
||||
## Transients
|
||||
|
||||
The graph supports `transient`, which is storage for non-versioned mutable
|
||||
|
||||
@@ -150,10 +150,15 @@ iD.modes.Select = function(entity) {
|
||||
if (entity) {
|
||||
changeTags(entity, inspector.tags());
|
||||
}
|
||||
|
||||
d3.select('.inspector-wrap')
|
||||
.style('display', 'none')
|
||||
.html('');
|
||||
|
||||
// Firefox incorrectly implements blur, so typeahead elements
|
||||
// are not correctly removed. Remove any stragglers manually.
|
||||
d3.selectAll('div.typeahead').remove();
|
||||
|
||||
behaviors.forEach(function(behavior) {
|
||||
behavior.off(surface);
|
||||
});
|
||||
|
||||
@@ -149,9 +149,12 @@ iD.ui.inspector = function() {
|
||||
});
|
||||
if (d.key && d.value) {
|
||||
taginfo.docs(params, function(err, docs) {
|
||||
var en = _.find(docs, function(d) {
|
||||
return d.lang == 'en';
|
||||
});
|
||||
var en;
|
||||
if (!err && docs) {
|
||||
en = _.find(docs, function(d) {
|
||||
return d.lang == 'en';
|
||||
});
|
||||
}
|
||||
if (en) {
|
||||
var types = [];
|
||||
if (en.on_area) types.push('area');
|
||||
@@ -170,7 +173,7 @@ iD.ui.inspector = function() {
|
||||
});
|
||||
} else if (d.key) {
|
||||
taginfo.values(params, function(err, values) {
|
||||
if (values.data.length) {
|
||||
if (!err && values.data.length) {
|
||||
iD.ui.modal()
|
||||
.select('.content')
|
||||
.datum({
|
||||
|
||||
Reference in New Issue
Block a user