Skip to content

A left click in the map should close the context menu #135

Closed

Description

@otbutz

grafik

Activity

  1. added
    bug
    on Oct 1, 2021
  2. added this to the 0.4 milestone on Oct 11, 2021
  3. easbar commented on Nov 10, 2021

    @easbar
    Member

    This is/was a bug in react-map-gl: visgl/react-map-gl#1389.
    #158 will 'silently' update react-map-gl from 5.3.16 to 5.3.17 which should fix the issue (because the version was set to ^5.3.15 and #158 re-creates the package-lock.json file).

    Unfortunately the upgrade does not fix the issue though...

  4. easbar commented on Nov 10, 2021

    @easbar
    Member

    But this is probably a problem in our code. I confirmed that 5.3.17 fixes the problem upstream using their "controls" demo: https://github.com/visgl/react-map-gl/tree/master/examples/controls). They use this:

                closeOnClick={true}
                onClose={setPopupInfo}

    but we do not use onClose yet. If I use this the context menu closes immediately after it was opened. Maybe this is even related to the context menu not appearing on mobile (#149)

  5. easbar commented on Nov 10, 2021

    @easbar
    Member

    ... or maybe not: I can reproduce another problem upstream: visgl/react-map-gl#1389 (comment)

  6. easbar commented on Jan 26, 2022

    @easbar
    Member

    This issue is still not fixed after #159. It's actually worse now: The context menu not only stays open when we click the map, but also when we pan the map. I'm actually undecided whether or not it should close when we move the map, but it should definitely close when we click the map.

  7. Janekdererste commented on May 9, 2022

    @Janekdererste
    Collaborator

    Attempted to fix this with e19dcd9 which I accidentially pushed to master directly.

    If we think this works out, The Longtouch Handler in the ContextMenu.tsx Component remains to be removed

  8. easbar commented on May 10, 2022

    @easbar
    Member

    Yes, this works perfectly, thanks! I tried FF + Chrome. The popup stays open when we move the map, but since it closes when we click I think this is fine (or maybe even better).

  9. easbar commented on May 11, 2022

    @easbar
    Member

    Sorry, I should have tried on mobile before merging. I cannot open the context menu anymore. Tried on iOS 14.8 using Safari,FF&Chrome

  10. reopened this on May 11, 2022
  11. easbar commented on May 11, 2022

    @easbar
    Member

    Openlayers implemented a long-press touch event for their drawing feature: openlayers/openlayers#10904 (comment)
    Maybe this helps figuring out how we can open (and close) the context menu.

  12. Janekdererste commented on May 13, 2022

    @Janekdererste
    Collaborator

    Ah, very good. I’ll look into that.

  13. karussell commented on Jul 18, 2022

    @karussell
    Member

    On Android there is now the problem that the context menu closes as soon as I release the finger except if I move it slightly, then it stays open.

  14. removed this from the 0.4 milestone on Sep 2, 2022
  15. easbar commented on Oct 5, 2022

    @easbar
    Member

    I'm actually undecided whether or not it should close when we move the map, but it should definitely close when we click the map.

    Now I think it should definitely stay open when we move the map, because quite often we have to move the map a bit after opening the menu to see all the menu entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions