From 96d6b457343dc16221fccd641e366b3a191d1153 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 30 Aug 2023 13:26:16 +0200 Subject: [PATCH] Put focus on name when opening feature edit panel cf #243 --- umap/static/umap/js/umap.features.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index b22e1491..997218ff 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -118,6 +118,9 @@ L.U.FeatureMixin = { callback: this._redraw, // In case we have dynamic options… }) container.appendChild(builder.build()) + this.map.ui.once('panel:ready', () => { + builder.helpers['properties.name'].input.focus() + }) this.appendEditFieldsets(container) const advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')) this.getAdvancedEditActions(advancedActions)