vuetifyjs / vuetifyjs/vuetify

[Bug Report][3.6.13] v-slide-group returns to the leftmost position unexpectedly on iPhone

Open
#20,245 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C: VSlideGroup help wanted platform specific T: bug
Dominant language
TypeScript
Stars
41k
Forks
7.1k
Avg merge
1d 21h
Merged PRs (30d)
11

Description

Environment

Vuetify Version: 3.6.13
Last working version: 3.6.13
Vue Version: 3.4.34
Browsers: Safari
OS: iOS

Steps to reproduce

Description:
I am experiencing an issue with the v-slide-group component in Vuetify. When tapping on a v-btn within the slide group on an iPhone, the v-slide-group occasionally returns to the leftmost position unexpectedly. This behavior disrupts the user experience, especially when trying to view or interact with items that are not at the beginning of the group.

Steps to Reproduce:

  1. Create a v-slide-group with multiple v-btn elements (more than can be displayed in the initial view) with click events defined.
  2. Scroll to an item towards the end of the slide group.
  3. Select an item that appears after scrolling.
  4. Observe that the slide group sometimes returns to the leftmost position.
Expected Behavior

The v-slide-group should maintain its current position and not return to the leftmost position unless explicitly directed to do so by user interaction.

Actual Behavior

The v-slide-group intermittently scrolls back to the leftmost position without user intent, making it difficult to interact with items towards the end of the group.

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

In the provided example, you can observe the issue by checking it on iPhone's Safari browser. Click the rightmost button once to see it return to the left. In this simplified example, it only returns once, but in more complex scenarios with various functions defined, the leftmost return occurs frequently.

Additional Information:
It seems that the iPhone's touch events might be related to this issue. Adding @touchend.prevent='' to the v-slide-group or each v-btn inside it prevents the leftmost return behavior, but it causes the buttons to remain in an active state and makes the code cumbersome and cluttered.

Thank you for your help in resolving this issue.

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 with the v-slide-group and v-btn reproduction linked in the issue, using iPhone Safari and the described scroll-and-select steps. Investigate the component behavior around touch interaction and confirm the fix when selecting a button after scrolling no longer returns the group to the leftmost position.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.