Bug 249545 - Make DragController::DragIsMove return false when selection does not have focus
Summary: Make DragController::DragIsMove return false when selection does not have focus
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-17 15:43 PST by Ahmad Saleem
Modified: 2022-12-24 15:44 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 2022-12-17 15:43:46 PST
Hi Team,

While going through Blink's commit, I came across another interesting one, which can be merged to improve further user experience:

Blink Commit - https://chromium.googlesource.com/chromium/src.git/+/5fb678a9ee8b5e8e303ea0d66ae5efe979e6fcd2

Webkit GitHub Source - https://github.com/WebKit/WebKit/blob/c2dd7ba9890874670b16f914a46afb7c420da9ce/Source/WebCore/page/DragController.cpp#L192

Can we use "isFocusedAndActive()" from FrameSelection for this or not?

If someone can confirm then I am happy to do PR and fix this.

Thanks!
Comment 1 Ahmad Saleem 2022-12-24 01:27:24 PST
I tried this in following PR - https://github.com/WebKit/WebKit/pull/7928

It seems that we have add "SelectionHasFunction" function because "isFocusedAndActive" is not direct replacement.

If we create equivalent of "SelectionHasFocus" then it would be easy to fix this bug and if we don't face any other focus related bug.

I am going to close my PR but you can use it for reference:

1) Skip on iOS
2) Which line etc., in the WebKit Source etc.
3) I tried "focusedElement()" as well but got build errors.

NOTE - assert-selection.js is up to date from Chromium source, so it is not script issue as well. (at least IMO)
Comment 2 Radar WebKit Bug Importer 2022-12-24 15:44:15 PST
<rdar://problem/103689075>