mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
fix search results from being stuck in highlighted state
fixes #10661, replaces and closes #10666 See https://github.com/openstreetmap/iD/pull/10666#issuecomment-2585256927 for more details about this fix
This commit is contained in:
@@ -48,6 +48,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
* Render highway direction cones only on matching parent ways ([#9013])
|
||||
* Prevent edit menu from being covered up by street level imagery or other map overlay panels ([#10495])
|
||||
* Fix grid lines from showing up on background map tiles in certain situations (semi-transparent tiles or fractional browser zoom level) ([#10594], thanks [@Nekzuris])
|
||||
* Prevent search results from sometimes getting stuck in the highlighted state when mouse-hovering the list of search results while typing ([#10661])
|
||||
#### :earth_asia: Localization
|
||||
* Update Sinitic languages in the Multilingual Names field ([#10488], thanks [@winstonsung])
|
||||
* Update the list of languages in the Wikipedia field ([#10489])
|
||||
|
||||
@@ -285,18 +285,15 @@ export function uiFeatureList(context) {
|
||||
list.selectAll('.geocode-item')
|
||||
.style('display', (value && _geocodeResults === undefined) ? 'block' : 'none');
|
||||
|
||||
list.selectAll('.feature-list-item')
|
||||
.data([-1])
|
||||
.remove();
|
||||
|
||||
var items = list.selectAll('.feature-list-item')
|
||||
.data(results, function(d) { return d.id; });
|
||||
|
||||
var enter = items.enter()
|
||||
.insert('button', '.geocode-item')
|
||||
.attr('class', 'feature-list-item')
|
||||
.on('mouseover', mouseover)
|
||||
.on('mouseout', mouseout)
|
||||
.on('pointerenter', mouseover)
|
||||
.on('pointerleave', mouseout)
|
||||
.on('blur', mouseout)
|
||||
.on('click', click);
|
||||
|
||||
var label = enter
|
||||
@@ -326,23 +323,21 @@ export function uiFeatureList(context) {
|
||||
.transition()
|
||||
.style('opacity', 1);
|
||||
|
||||
items.order();
|
||||
|
||||
items.exit()
|
||||
.each(d => mouseout(undefined, d))
|
||||
.remove();
|
||||
|
||||
items.merge(enter)
|
||||
.order();
|
||||
}
|
||||
|
||||
|
||||
function mouseover(d3_event, d) {
|
||||
if (d.id === -1) return;
|
||||
|
||||
utilHighlightEntities([d.id], true, context);
|
||||
}
|
||||
|
||||
|
||||
function mouseout(d3_event, d) {
|
||||
if (d.id === -1) return;
|
||||
|
||||
utilHighlightEntities([d.id], false, context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user