-
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
fix(cdk/platform): rtl scroll axis incorrectly determined in Safari macOS #19830
fix(cdk/platform): rtl scroll axis incorrectly determined in Safari macOS #19830
Conversation
…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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@googlebot Ping. |
…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. |
In Safari on macOS, the RTL scroll axis is determined incorrectly when
scrollbars are set to
Always Display
as per macOS general systempreferences. 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 containers1px
height. Thevertical 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]
whileusually
0px
is the right boundary. We fix this by simply ensuringthat 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.
I tested manually on Chrome 83.0.4103.116 Windows 10; macOS High Sierra Firefox 77; macOS High Sierra Safari 11.1, macOS Mojave Safari 12.1, macOS Catalina Safari 13.1, Windows 10 IE11.900.18362.0. Unfortunately there are no tests for this feature detection, nor would it be easy to write one for the particular scenario where a macOS setting is required.
Fixes #14609.