Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 798 forks source link

Map block: Selecting the Map block in the editor is very difficult #31870

Closed jp-imagines closed 1 day ago

jp-imagines commented 1 year ago

Impacted plugin

Jetpack

Quick summary

Clicking on a Map block causes you to interact with the map itself, rather than the block, which makes it nearly impossible to select the block without using the List View or the "select" tool.

Steps to reproduce

  1. Insert a Map block on a post or page.
  2. Click on any other block (or the post/page title).
  3. Click on the Map block again.

A clear and concise description of what you expected to happen.

The Map block should be selected, with the block toolbar visible, so that it can be edited, moved, or deleted.

What actually happened

Focus doesn't seem to move to the Map block and remains on the previously selected element. Clicking around the Map block interacts with the map itself.

https://github.com/Automattic/jetpack/assets/5630717/59332383-f955-4143-8ded-ab28de41b9ff

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Atomic

Logs or notes

Only replicated on WoA so far, but I imagine it affects Simple too.

Workarounds:

jeherve commented 1 year ago

That's something I had experienced as well when first testing this: https://github.com/Automattic/jetpack/pull/29098#pullrequestreview-1400220652

It'd be nice to improve on that behavior.

github-actions[bot] commented 7 months ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

coder-karen commented 1 week ago

The issue does appear to be due to how Mapkit is rendered on the Map block. It is replicable on WoA and Simple sites as they use Mapkit instead of Mapbox, but can be replicated on self-hosted and for local testing by setting the cookie in your browser console with document.cookie = "map_provider=mapkit";.

Adding these notes as I started looking into it but haven't identified a solution just yet.