-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
getRtlScrollAxisType detects incorrect RtlScrollAxisType for safari #14609
Comments
Hello, on my end the RTL scroll axis type is set to This is the demo I used: https://stackblitz.com/edit/angular-yehn5j?file=src/app/cdk-platform-overview-example.ts Happy to re-open if you can point us to a demo that shows the issue. |
…acOS In Safari on macOS, the RTL scroll axis is determined incorrectly when scrollbars are set to `Always Display` as per macOS general system preferences. Our test element for the scroll axis sets a fixed height. This is resulting in a vertical scroll bar as the horizontal scroll bar for testing `scrollLeft` exceeds the scroll containers `1px` height. The vertical scroll bar then unveils a bug in Webkit where space is acquired on the right side for the scroll bar (while it's displayed on the left). This space causes our scroll axis detection to break as the horizontal `scrollLeft` unexpectedly expands to: `[-scrollWidth, 15px]` while usually `0px` is the right boundary. We fix this by simply ensuring that no vertical scroll bar is ever displayed. The vertical scrolling is not needed for determining the RTL horizontal scroll axis type. I've reported a bug upstream in Webkit: https://bugs.webkit.org/show_bug.cgi?id=213851. Fixes angular#14609.
…acOS In Safari on macOS, the RTL scroll axis is determined incorrectly when scrollbars are set to `Always Display` as per macOS general system preferences. Our test element for the scroll axis sets a fixed height. This is resulting in a vertical scroll bar as the horizontal scroll bar for testing `scrollLeft` exceeds the scroll containers `1px` height. The vertical scroll bar then unveils a bug in Webkit where space is acquired on the right side for the scroll bar (while it's displayed on the left). This space causes our scroll axis detection to break as the horizontal `scrollLeft` unexpectedly expands to: `[-scrollWidth, 15px]` while usually `0px` is the right boundary. We fix this by simply ensuring that no vertical scroll bar is ever displayed. The vertical scrolling is not needed for determining the RTL horizontal scroll axis type. I've reported a bug upstream in Webkit: https://bugs.webkit.org/show_bug.cgi?id=213851. Fixes #14609.
…acOS (#19830) In Safari on macOS, the RTL scroll axis is determined incorrectly when scrollbars are set to `Always Display` as per macOS general system preferences. Our test element for the scroll axis sets a fixed height. This is resulting in a vertical scroll bar as the horizontal scroll bar for testing `scrollLeft` exceeds the scroll containers `1px` height. The vertical scroll bar then unveils a bug in Webkit where space is acquired on the right side for the scroll bar (while it's displayed on the left). This space causes our scroll axis detection to break as the horizontal `scrollLeft` unexpectedly expands to: `[-scrollWidth, 15px]` while usually `0px` is the right boundary. We fix this by simply ensuring that no vertical scroll bar is ever displayed. The vertical scrolling is not needed for determining the RTL horizontal scroll axis type. I've reported a bug upstream in Webkit: https://bugs.webkit.org/show_bug.cgi?id=213851. Fixes #14609.
…acOS (#19830) In Safari on macOS, the RTL scroll axis is determined incorrectly when scrollbars are set to `Always Display` as per macOS general system preferences. Our test element for the scroll axis sets a fixed height. This is resulting in a vertical scroll bar as the horizontal scroll bar for testing `scrollLeft` exceeds the scroll containers `1px` height. The vertical scroll bar then unveils a bug in Webkit where space is acquired on the right side for the scroll bar (while it's displayed on the left). This space causes our scroll axis detection to break as the horizontal `scrollLeft` unexpectedly expands to: `[-scrollWidth, 15px]` while usually `0px` is the right boundary. We fix this by simply ensuring that no vertical scroll bar is ever displayed. The vertical scrolling is not needed for determining the RTL horizontal scroll axis type. I've reported a bug upstream in Webkit: https://bugs.webkit.org/show_bug.cgi?id=213851. Fixes #14609.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What is the expected behavior?
In safari,
getRtlScrollAxisType() === RtlScrollAxisType.NEGATED
What is the current behavior?
getRtlScrollAxisType()
returnsRtlScrollAxisType.INVERTED
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
Problem unlikely to do with safari and os. Other libraries detected it correctly using feature detection technique
The text was updated successfully, but these errors were encountered: