Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elements inside ScrollContainer scroll not selectable on iPad in Safari #91

Open
criacuervos opened this issue Jun 20, 2024 · 0 comments

Comments

@criacuervos
Copy link

criacuervos commented Jun 20, 2024

Hi all,

I'm running into an issue that only occurs on iPad, testing using safari. The elements are not responsive to touch, but work (element is clicked, seen by a changing css class) when you use two fingers. I have it in my component like this

<React.Fragment>
                <ScrollContainer horizontal={true} vertical={false} className={"scroll-container margin-top margin-bottom"}>
                    <Avatars avatars={this.props.avatars} selectedAvatarIndex={this.props.selectedAvatarIndex} clickOnAvatar={this.props.clickOnAvatar} />
                </ScrollContainer>
</React.Fragment>

After testing nearly everything, I finally removed the component and it works as expected. After some safari debugging on ipad simulator I can see that the event is an onMouseDown event, which I would have expected to be an onTouchStart. It seems like there is some preventDefault occurring and the touch is not being recognized in the child elements. The HTML looks roughly like this:

<div class="indiana-scroll-container--hide-scrollbars indiana-scroll-container--native-scroll>
       <div>
              <img/>
        </div>
</div>
@criacuervos criacuervos changed the title Elements inside vertical scroll not selectable on iPad Elements inside horizontal scroll not selectable on iPad Jun 21, 2024
@criacuervos criacuervos changed the title Elements inside horizontal scroll not selectable on iPad Elements inside horizontal scroll not selectable on Safari/iPad Jun 21, 2024
@criacuervos criacuervos changed the title Elements inside horizontal scroll not selectable on Safari/iPad Elements inside ScrollContainer scroll not selectable on iPad in Safari Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant