Merge pull request #1783 from umap-project/fix-name-click
fix: open caption form when clicking on map name, not advanced props
This commit is contained in:
commit
596004c8c0
2 changed files with 9 additions and 8 deletions
|
@ -754,13 +754,7 @@ const ControlsMixin = {
|
|||
const rightContainer = L.DomUtil.create('div', 'umap-right-edit-toolbox', container)
|
||||
const logo = L.DomUtil.create('div', 'logo', leftContainer)
|
||||
L.DomUtil.createLink('', logo, 'uMap', '/', null, L._('Go to the homepage'))
|
||||
const nameButton = L.DomUtil.createButton(
|
||||
'map-name',
|
||||
leftContainer,
|
||||
'',
|
||||
this.edit,
|
||||
this
|
||||
)
|
||||
const nameButton = L.DomUtil.createButton('map-name', leftContainer, '')
|
||||
L.DomEvent.on(
|
||||
nameButton,
|
||||
'mouseover',
|
||||
|
@ -809,7 +803,7 @@ const ControlsMixin = {
|
|||
update()
|
||||
this.once('saved', L.bind(update, this))
|
||||
if (this.options.editMode === 'advanced') {
|
||||
L.DomEvent.on(nameButton, 'click', this.edit, this)
|
||||
L.DomEvent.on(nameButton, 'click', this.editCaption, this)
|
||||
L.DomEvent.on(shareStatusButton, 'click', this.permissions.edit, this.permissions)
|
||||
}
|
||||
this.on('postsync', L.bind(update, this))
|
||||
|
|
|
@ -21,6 +21,13 @@ def test_can_edit_name(page, live_server, tilelayer):
|
|||
)
|
||||
|
||||
|
||||
def test_can_edit_name_on_click_on_toolbar(page, live_server, tilelayer):
|
||||
page.goto(f"{live_server.url}/en/map/new/")
|
||||
page.locator(".map-name").click()
|
||||
name_input = page.locator('.map-metadata input[name="name"]')
|
||||
expect(name_input).to_be_visible()
|
||||
|
||||
|
||||
def test_map_name_impacts_ui(live_server, page, tilelayer):
|
||||
page.goto(f"{live_server.url}/en/map/new/")
|
||||
|
||||
|
|
Loading…
Reference in a new issue