mapbox / mapbox/mapbox-gl-compare
Two Swiper appear on the Compare
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 152
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
**Desc:**
For some reason, everything works fine when booted using Dev mode. However, after building to the production version, the Swiper is normal when entering the first time, and when entering other pages and returning, two Swipers will appear, and one of them is in the previous location and cannot be dragged. It seems to be cached or something, but Vue doesn't turn KeepAlive on.
If I force the page to refresh, it will return to normal, but it will greatly affect the experience.
**Version:**
"mapbox-gl": "^2.15.0",
"mapbox-gl-compare": "^0.4.1",
"@mapbox/mapbox-gl-sync-move": "^0.3.1",
"Vue": "^3.3.4",

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the production build with Vue 3.3.4, mapbox-gl 2.15.0, mapbox-gl-compare 0.4.1, and @mapbox/mapbox-gl-sync-move 0.3.1. Navigate away from Compare and back to observe whether a second Swiper remains; done means returning to the page leaves exactly one draggable Swiper in the correct location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100