Skip to content

Fix scrollbar on mobile issue #333#351

Open
gry-dmitrij wants to merge 3 commits intoAndarist:mainfrom
gry-dmitrij:main
Open

Fix scrollbar on mobile issue #333#351
gry-dmitrij wants to merge 3 commits intoAndarist:mainfrom
gry-dmitrij:main

Conversation

@gry-dmitrij
Copy link

scrollHeight is rounded. So when scrollHeight is float scrollbar shows on the chrome mobile browser even if there is nowhere to scroll to.
I found only one way: increase the scroll by 1 px

scrollHeight is rounded. So when scrollHeight is float scrollbar shows on the chrome mobile browser even if there is nowhere to scroll to.
I found only one way: increase the scroll by 1 px
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2022

⚠️ No Changeset found

Latest commit: f3c4268

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@knownasilya
Copy link
Contributor

Would love to see this merged

@knownasilya
Copy link
Contributor

Any chance this can get merged?

@gry-dmitrij
Copy link
Author

If urgently needed, I posted the changes here


const getHeight = (node: HTMLElement, sizingData: SizingData): number => {
const height = node.scrollHeight;
const height = node.scrollHeight + 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be rounded using Math.round or Math.ceil.

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

Successfully merging this pull request may close these issues.

3 participants