You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A left click in the map should close the context menu #135
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...
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)
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.
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).
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.
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.
Activity
easbar commentedon Nov 10, 2021
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.15and #158 re-creates the package-lock.json file).Unfortunately the upgrade does not fix the issue though...
easbar commentedon Nov 10, 2021
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:
but we do not use
onCloseyet. 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)easbar commentedon Nov 10, 2021
... or maybe not: I can reproduce another problem upstream: visgl/react-map-gl#1389 (comment)
easbar commentedon Jan 26, 2022
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.
Janekdererste commentedon May 9, 2022
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.tsxComponent remains to be removedeasbar commentedon May 10, 2022
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).
easbar commentedon May 11, 2022
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
easbar commentedon May 11, 2022
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.
Janekdererste commentedon May 13, 2022
Ah, very good. I’ll look into that.
karussell commentedon Jul 18, 2022
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.
Revert 'Openlayers seems to register longpress itself' #135
no need for LongTouchHandler, #135
workaround for #135
use Cross SVG for context menu too, #135
easbar commentedon Oct 5, 2022
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.
Revert 'Openlayers seems to register longpress itself' graphhopper#135
no need for LongTouchHandler, graphhopper#135
workaround for graphhopper#135
use Cross SVG for context menu too, graphhopper#135