Skip to content
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

Add enableDragAndDrop capability #504

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

jrandolf-2
Copy link
Contributor

@jrandolf-2 jrandolf-2 commented Jul 28, 2023

Fixed: #487


Preview | Diff

@jrandolf-2 jrandolf-2 requested a review from OrKoN July 28, 2023 10:07
The [=matched capability serialization algorithm=] for the "<code>enableDragAndDrop</code>" capability,
with parameter |value| is:

1. If |value| is false, the [=endpoint node=] must disable [=drag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too broad: we don't want to disable drag and drop for other sessions and/or regular user input. I believe we only want to make sure that the actions dispatched by the WebDriver BiDi client don't get converted into a drag and drop, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly the problem is drag and drop must be completely disabled on the endpoint. This is because while drag and drop is happening, all inputs (other sessions, regular user input, etc) gets ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it's impossible to separate regular user input and BiDi input for drag and drop. The reason is that drag and drop is predominantly a OS API, meaning when it happens, you must either delegate it to the OS or delegate it to the browser (similar to how Chromium does it). You cannot have both control it at the same time since the OS expects to be able to end the drag itself.

@AutomatedTester
Copy link

Why would this be a capability? People are going to be confused when they try drag and drop and it doesn't work natively.

@jrandolf-2 jrandolf-2 added the needs-discussion Issues to be discussed by the working group label Jul 28, 2023
@OrKoN
Copy link
Contributor

OrKoN commented Jul 28, 2023

It looks like we would not need anything like this if implementations pass WPT tests for drag and drop: https://wpt.fyi/results/webdriver/tests/bidi/input/perform_actions/pointer_mouse.py?label=master&label=experimental&aligned&q=webdriver Given that this item got a high priority in the roadmap, let's discuss in the next WG meeting if it makes sense to include drag and drop as an explicit milestone into the roadmap.

@OrKoN OrKoN marked this pull request as draft July 28, 2023 11:21
@AutomatedTester
Copy link

My expectation is that if this becomes a capability most, if not all, clients would likely have this set to true for all sessions as it will be pretty poor DX to have to figure out why the commands fail to do what we want. WebDriver classic already passes drag and drop if it is a JS driven drag/drop. I raised a issue a few years ago to get the HTML version with draggable sorted.

@whimboo
Copy link
Contributor

whimboo commented Aug 1, 2023

And to add using a capability would mean the setting is sticky and a client would have to create a new session to actually flip the value. I agree that this is not a solution that we should favor.

Overall this should have been discussed first (and now I see the needs-discussion label added to the actual referenced issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion Issues to be discussed by the working group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement capabilities for Drag n' Drop
4 participants