Bug 263512 - REGRESSION (Sonoma?): RTL scrollbar incorrect spacing
Summary: REGRESSION (Sonoma?): RTL scrollbar incorrect spacing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikos Mouchtaris
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-22 11:32 PDT by Ebrahim Byagowi
Modified: 2024-05-21 10:34 PDT (History)
8 users (show)

See Also:


Attachments
Incorrect space between the scroll and textarea's border (30.80 KB, image/jpeg)
2023-10-22 11:32 PDT, Ebrahim Byagowi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ebrahim Byagowi 2023-10-22 11:32:36 PDT
Created attachment 468298 [details]
Incorrect space between the scroll and textarea's border

Steps to reproduce:
1. Open
data:text/html,<textarea dir=rtl>%0A%0A%0A%0A%0A
2. Try to scroll the texture

Expected:
Just like 
data:text/html,<textarea>%0A%0A%0A%0A%0A
Not space between the scroll and textarea's border

Actual:
There's an incorrect space, the minimized scroll should be at left side expanded to right side.
Comment 1 Ahmad Saleem 2023-10-22 15:16:21 PDT
Is it on macOS Ventura or Sonoma?
Comment 2 Alexey Proskuryakov 2023-10-23 09:10:11 PDT
I can reproduce this on macOS Sonoma, but not on macOS Ventura. Not 100% confident if this is an OS change, because I also used different Safari/WebKit builds on these, but clearly a regression one way or another.
Comment 3 Radar WebKit Bug Importer 2023-10-23 09:10:22 PDT
<rdar://problem/117355120>
Comment 4 Ebrahim Byagowi 2023-10-23 13:04:24 PDT
Yes, this should be a regression and perhaps it's since Sonoma, I was just a bit less confident about being regression and didn't mention it as I had an unclear of something happened in past which now I remember I saw something similar in Chromium in 2016 https://crbug.com/626919 (not related)

Just to add, this isn't only about textarea scroll but every scroll is affected AFAICT, for example

data:text/html,<html dir=rtl style="height:300%;text-align:end">rtl
Comment 5 Simon Fraser (smfr) 2023-10-31 18:02:25 PDT
The issue here is that we position the scrollbar for its wide, hovered state, but the hover makes it grow to the left, not the right.
Comment 6 Simon Fraser (smfr) 2023-10-31 18:06:37 PDT
I guess is that we fail to set `userInterfaceLayoutDirection` in the UI process with UI-side compositing.
Comment 7 Ebrahim Byagowi 2024-01-26 00:20:56 PST
A friendly bump as it's so annoying for users using RTL script languages
Comment 8 Nikos Mouchtaris 2024-02-26 16:31:20 PST
Pull request: https://github.com/WebKit/WebKit/pull/25141
Comment 9 EWS 2024-03-13 11:46:26 PDT
Committed 276040@main (e7a46d11ffb4): <https://commits.webkit.org/276040@main>

Reviewed commits have been landed. Closing PR #25141 and removing active labels.
Comment 10 Ebrahim Byagowi 2024-05-21 10:34:03 PDT
The fix is finally landed on stable macOS, thank you, it was so annoying, I wish to never see it again [which thanks to the test cases that's for sure]. Thanks 😊