mapbox / mapbox/mapbox-gl-compare

Two Swiper appear on the Compare

Open
#52 1 comment 0 reactions 0 assignees View on GitHub

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",

![Two Swiper](https://github.com/mapbox/mapbox-gl-compare/assets/63346490/c4bb8213-725d-4de3-b46b-5536d4274933)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.