Bug 250207 - Fix scrollbar thumb drag cancellation in RTL mode
Summary: Fix scrollbar thumb drag cancellation in RTL mode
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-06 07:32 PST by Ahmad Saleem
Modified: 2024-02-01 21:41 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-06 07:32:12 PST
Hi Team,

While going through Blink's commit, I came across another filing testcase:

Test Case - https://jsfiddle.net/dbskt3jo/

^ Try to pick horizontal scrollbar knob and scroll on left side, it will not do anything in Safari 16.2. It works in Chrome Canary 111 and Firefox Nightly 110 and move the scrollbar on drag while selecting knob.

Blink Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=175100

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/platform/Scrollbar.cpp#311

Just wanted to raise so we can fix this bug as well.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-01-13 07:33:16 PST
<rdar://problem/104223915>
Comment 2 Ahmad Saleem 2023-06-15 13:04:41 PDT
Tried: https://github.com/WebKit/WebKit/pull/8355

NOTE: The portion of code, this is trying to modify is within platform 'if' block to restrict it to non-iOS, so we might need to skip this test on iOS.

 m_scrollableArea.scrollToOffsetWithoutAnimation(m_orientation, (m_dragOrigin + m_scrollableArea.minimumScrollPosition().y()));

^ This does not fix test.

 m_scrollableArea.scrollToOffsetWithoutAnimation(m_orientation, (m_dragOrigin + m_scrollableArea.minimumScrollPosition().x()));

^ This does not fix test.

______

Plus 'm_orientation' or (orientation()) also don't work similar to Blink patch.
Comment 3 Ahmad Saleem 2023-06-15 13:42:02 PDT
(In reply to Ahmad Saleem from comment #2)
> Tried: https://github.com/WebKit/WebKit/pull/8355
> 
> NOTE: The portion of code, this is trying to modify is within platform 'if'
> block to restrict it to non-iOS, so we might need to skip this test on iOS.
> 
>  m_scrollableArea.scrollToOffsetWithoutAnimation(m_orientation,
> (m_dragOrigin + m_scrollableArea.minimumScrollPosition().y()));
> 
> ^ This does not fix test.
> 
>  m_scrollableArea.scrollToOffsetWithoutAnimation(m_orientation,
> (m_dragOrigin + m_scrollableArea.minimumScrollPosition().x()));
> 
> ^ This does not fix test.
> 
> ______
> 
> Plus 'm_orientation' or (orientation()) also don't work similar to Blink
> patch.

Note - this seems to be interesting as well: https://src.chromium.org/viewvc/blink?view=revision&revision=161649

^ Will build WebKit ToT to test updated testcase to confirm whether WebKit suffer from also 'typo' error or not, which leads to breaking horizontal drag.
Comment 4 fantasai 2024-02-01 16:46:23 PST
This also affects scrolling in reversed flex containers, see https://bugs.webkit.org/show_bug.cgi?id=221347#c11

Basically scrolling to the right of the origin is broken.
Comment 5 fantasai 2024-02-01 20:06:01 PST
Pull request: https://github.com/WebKit/WebKit/pull/23720
Comment 6 fantasai 2024-02-01 21:41:16 PST
Actually this looks like it's maybe a duplicate of https://bugs.webkit.org/show_bug.cgi?id=256995 ? Which got fixed in https://github.com/WebKit/WebKit/pull/22189 I think.