Jetpack: Map Block: Reusable block with markers steals focus

Created on 4 Dec 2018  Â·  3Comments  Â·  Source: Automattic/jetpack

Originally reported at p58i-7sR-p2 #comment-40517 while testing on WP.com

Saving a map with a marker as a reusable block means that each time you add the reusable map block to a post/page it takes focus and jumps to the reusable block to add a marker (even though it already has a marker).

Steps to reproduce

  1. Create map block with 1 marker
  2. Save this map block with 1 marker as reusable
  3. Enter the reusable block into a new post or page – note it asks to add a marker – dismiss marker
  4. Add a diff

Screenshot / Video

reusable-map

/cc @jeffersonrabb @enejb @sirreal

Good For Community Gutenberg [Block] Map [Pri] Low [Type] Bug [Type] Good First Bug

Most helpful comment

Seems that the correct solution is to show the ADD MARKER UI on initialization _only_ if there are no markers. If any markers are set, the user must click the toolbar icon to reveal the UI. Does this seem right?

All 3 comments

Seems that the correct solution is to show the ADD MARKER UI on initialization _only_ if there are no markers. If any markers are set, the user must click the toolbar icon to reveal the UI. Does this seem right?

If any markers are set, the user must click the toolbar icon to reveal the UI. Does this seem right?

Yes that sounds like a good solution

It doesn't need to be reusable — this happens when editing a page that already has a map block inserted.

+1 to @jeffersonrabb's proposed solution.

Was this page helpful?
0 / 5 - 0 ratings