mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 21:30:36 -05:00
[PR #2825] [MERGED] fix(analytics): prevent countries from getting stuck highlighted on world map #3177
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2825
Author: @AdnanSilajdzic
Created: 4/10/2026
Status: ✅ Merged
Merged: 4/11/2026
Merged by: @oschwartz10612
Base:
dev← Head:fix/worldmap-hover-stuck-public📝 Commits (1)
1aedf9dfix(worldmap): avoid stuck country hover state📊 Changes
1 file changed (+17 additions, -7 deletions)
View changed files
📝
src/components/WorldMap.tsx(+17 -7)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
This fixes an issue on the analytics world map where hovered countries could remain highlighted after the cursor moved away.
I was able to reproduce this on the analytics page and traced it back to the hover implementation in
WorldMap.tsx.Before:
https://github.com/user-attachments/assets/268c63d3-9784-43e2-bde9-e8cfd4778e06
After applying this fix:
https://github.com/user-attachments/assets/e7a5ba94-2e49-4fe9-b019-dac927079dac
Cause
The previous implementation moved the hovered SVG country path to the end of the DOM during hover so it would render on top of neighboring countries.
That helped visually, but it also seems to interfere with hover cleanup in some cases, which can leave countries stuck in the highlighted state.
Fix
Instead of reordering the original country node during hover, this change renders the hovered country in a separate overlay path above the base map layer.
This keeps the hovered country visually on top while avoiding the sticky hover behavior.
How to test?
This can be tested by navigating to the
/{orgId}/settings/logs/analyticsand interacting with the map on the bottom of the screen.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.