mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Fix issue where preset list search would get autofocus unexpectedly
This commit is contained in:
@@ -487,6 +487,8 @@ export function modeSelect(context, selectedIDs) {
|
||||
|
||||
mode.exit = function() {
|
||||
|
||||
_newFeature = false;
|
||||
|
||||
_operations.forEach(function(operation) {
|
||||
if (operation.behavior) {
|
||||
context.uninstall(operation.behavior);
|
||||
|
||||
@@ -17,7 +17,7 @@ export function uiInspector(context) {
|
||||
var _newFeature = false;
|
||||
|
||||
|
||||
function inspector(selection, newFeature) {
|
||||
function inspector(selection) {
|
||||
presetList
|
||||
.entityIDs(_entityIDs)
|
||||
.autofocus(_newFeature)
|
||||
@@ -67,7 +67,7 @@ export function uiInspector(context) {
|
||||
if (entity.hasNonGeometryTags()) return false;
|
||||
|
||||
// prompt to select preset if feature is new and untagged
|
||||
if (newFeature) return true;
|
||||
if (_newFeature) return true;
|
||||
|
||||
// all existing features except vertices should default to inspector
|
||||
if (entity.geometry(context.graph()) !== 'vertex') return false;
|
||||
|
||||
@@ -238,7 +238,8 @@ export function uiSidebar(context) {
|
||||
if (!inspector.entityIDs() || !utilArrayIdentical(inspector.entityIDs(), [datum.id]) || inspector.state() !== 'hover') {
|
||||
inspector
|
||||
.state('hover')
|
||||
.entityIDs([datum.id]);
|
||||
.entityIDs([datum.id])
|
||||
.newFeature(false);
|
||||
|
||||
inspectorWrap
|
||||
.call(inspector);
|
||||
@@ -300,7 +301,7 @@ export function uiSidebar(context) {
|
||||
.newFeature(newFeature);
|
||||
|
||||
inspectorWrap
|
||||
.call(inspector, newFeature);
|
||||
.call(inspector);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user