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
Context menu breaks when switching between small and large screen layout #203
Activity
easbar commentedon Oct 5, 2022
Apparently this was fixed somewhere, or at least I can no longer reproduce this.
easbar commentedon Nov 10, 2022
The context menu still breaks when I
And it even happens in Chrome too.
[-]Context menu breaks when opening dev tools in Firefox[/-][+]Context menu breaks[/+][-]Context menu breaks[/-][+]Context menu breaks when switching between small and large screen layout[/+]easbar commentedon Nov 10, 2022
I think this is because we register the click listeners on the container element, which changes once we switch between the small & large layout:
graphhopper-maps/src/layers/ContextMenu.tsx
Lines 40 to 58 in de11ef9
Changing
map.oncetomap.onseems to fix it. I'm just not sure if we need to clean up the listeners somehow then?easbar commentedon Nov 10, 2022
Apparently no. I used this function that lists all event listeners and switched there and back between the small and the large layout. The number of listeners did not increase with every switch: https://gist.github.com/tkafka/1c5174ed5b446de7dfa4c04a3b09c95f
karussell commentedon Nov 10, 2022
Oh, nice. Thank you!
Setup new click listeners when we switch between the small and large …