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

dblclick events are not triggered except the first one #3043

Open
OrKoN opened this issue Jan 28, 2025 · 5 comments
Open

dblclick events are not triggered except the first one #3043

OrKoN opened this issue Jan 28, 2025 · 5 comments
Assignees
Labels
bug Something isn't working P1

Comments

@OrKoN
Copy link
Collaborator

OrKoN commented Jan 28, 2025

Test: #3042
Original report: puppeteer/puppeteer#13560

cc @sadym-chromium @Lightning00Blade

@OrKoN OrKoN added bug Something isn't working P1 labels Jan 28, 2025
@sadym-chromium sadym-chromium self-assigned this Jan 30, 2025
@sadym-chromium
Copy link
Collaborator

sadym-chromium commented Jan 30, 2025

Experiment showed the test is passing if Input.dispatchMouseEvent is dispatched BEFORE CDP event Page.lifecycleEvent.firstPaint.

@OrKoN
Copy link
Collaborator Author

OrKoN commented Jan 30, 2025

I am not sure how those could be related. Note that the CDP implementation in Puppeteer passes the test.

@sadym-chromium
Copy link
Collaborator

sadym-chromium commented Jan 30, 2025

Experiment showed the test is passing if Input.dispatchMouseEvent is dispatched BEFORE CDP event Page.lifecycleEvent.firstPaint.

This problem was preventing click events from being logged at all, and is not related to the specific issue mentioned.

The problem with not having the second double click is in the fact that BiDi does not have a concept of click count. As a workaround, Mapper uses a heuristic ClickContext, grouping all the clicks within 500 ms to a group of clicks. This ends up with the following CDP calls:

  • Input.dispatchMouseEvent: "mousePressed", "clickCount":1
  • Input.dispatchMouseEvent: "mouseReleased", "clickCount":1
  • Input.dispatchMouseEvent: "mousePressed", "clickCount":2
  • Input.dispatchMouseEvent: "mouseReleased", "clickCount":2
  • Input.dispatchMouseEvent: "mousePressed", "clickCount":3
  • Input.dispatchMouseEvent: "mouseReleased", "clickCount":3
  • Input.dispatchMouseEvent: "mousePressed", "clickCount":4
  • Input.dispatchMouseEvent: "mouseReleased", "clickCount":4

@OrKoN
Copy link
Collaborator Author

OrKoN commented Jan 30, 2025

Could we track clickCount within a single performActions call and not across the calls?

@whimboo
Copy link

whimboo commented Jan 30, 2025

Please see as well w3c/webdriver#1772 which might be related. Lets discuss this topic in the next monthly meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

3 participants