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

iOS scrolling stops when horizontal scoll bar goes to start #1055

Open
5 tasks done
stuta opened this issue Aug 29, 2024 · 7 comments
Open
5 tasks done

iOS scrolling stops when horizontal scoll bar goes to start #1055

stuta opened this issue Aug 29, 2024 · 7 comments

Comments

@stuta
Copy link

stuta commented Aug 29, 2024

Describe the bug

Go to https://6pac.github.io/SlickGrid/examples/example-trading-esm.html with iPad or iPhone.

When you swipe down directly or right-down scroll works perfectly. But when you swipe left-down so that the horizontal scrollbar hits the left start, then the scroll stops. It's very hard to scroll up or down when you want to see the first column. This problem does not happen when the horizontal scrollbar is to the right.

I guess that this is due to a feature when you drag the area to the right it shows white space before the first column. Maybe it has some function, but it is not correct because headers do not move at the same time. Remove that feature and the scroll stopping will be fixed.

I found an old issue mleibman/SlickGrid#573. This fix works because it removes the horizontal scrollbar.

.slick-viewport {
	-webkit-overflow-scrolling: touch;
	overflow-x: hidden !important;
}

Reproduction

Go to https://6pac.github.io/SlickGrid/examples/example-trading-esm.html with iPad or iPhone.

Which Framework are you using?

Vanilla / Plain JS

Environment Info

| Executable          | Version |
| ------------------- | ------- |
| SlickGrid | 5.12.0 |
| Browser(s)          | All iOS (tested Safari, Edge) |
| System OS           | tested iPad, iPhone |

Validations

@xvaara
Copy link

xvaara commented Sep 3, 2024

What he means:
When the scroll hits the left side the vertical inertia scrolling stops.

@ghiscoding
Copy link
Collaborator

I don't have any such hardware to test but what I wonder is if this CSS change has any impact on regular browsers, the use of !important seems rather drastic. I also don't quite understand the problem, so we might need more tests/confirmations before doing any changes. But even then, this fix can be implement by the user itself, do we really need a fix in the project?

@stuta
Copy link
Author

stuta commented Sep 6, 2024

That .slick-viewport overflow-x: hidden !important; prevents horizontal scrolling.

So it is not a fix, it makes the screen unusable because you can't see the columns on the right. But with that "fix" the inertia scrolling works. It was just a hint to help fix the real problem.

I tested this with an old Android phone, it works correctly with vertical inertia scrolling.

@ghiscoding
Copy link
Collaborator

ghiscoding commented Sep 6, 2024

Well ok but I still don't quite get the problem and also don't have the hardware to test this either and so any fix would really have to come by someone like you via a PR Contribution.

@stuta
Copy link
Author

stuta commented Sep 9, 2024

Can you give me info what files may need fixing? Is it only css or is some JavaScript running when inertia scrolling is running?

@ghiscoding
Copy link
Collaborator

well like I said earlier, I don't really understand the problem so No I cannot provide any info but maybe some guidance of maybe where to look. The only thing I can say is that all the files are in the src/ folder.

JavaScript running when inertia scrolling is running?

I have no idea what you mean, but all I can say is that CSS styling are applied by CSS files and by JavaScript code from the project. There's an onScroll event that user can optionally subscribe to.

SlickGrid/src/slick.grid.ts

Lines 5125 to 5130 in b3c2943

this.trigger(this.onScroll, {
triggeredBy: eventType,
scrollHeight: this.scrollHeight,
scrollLeft: this.scrollLeft,
scrollTop: this.scrollTop,
});

all the JS code that is being executed when scrolling is in the _handleScroll internal function, you may take a look to see what it does and if you find anything then contribute a PR

protected _handleScroll(eventType: 'mousewheel' | 'scroll' | 'system' = 'system') {

@stuta
Copy link
Author

stuta commented Sep 11, 2024

Debugging with iPad or iPhone is a little bit tricky.

Let's try to clarify what I mean:

scroll1

scroll2

When the horizontal scrollbar goes to the start left the inertia scrolling stops. Thos does not happen in computer browsers or in Android browsers, only in iOS (any version, any broser).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants