Merge pull request #1293 from umap-project/feature-name-focus

Put focus on name when opening feature edit panel
This commit is contained in:
Yohan Boniface 2023-09-01 17:26:10 +02:00 committed by GitHub
commit 1cd1094398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)