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

Double click event is sent incorrectly #2827

Open
1 task
shlyakpavel opened this issue Dec 7, 2024 · 0 comments
Open
1 task

Double click event is sent incorrectly #2827

shlyakpavel opened this issue Dec 7, 2024 · 0 comments
Labels
bug Something isn't working web compatibility

Comments

@shlyakpavel
Copy link
Contributor

Summary

As per spec:

This event type MUST be dispatched after the event type click if a click and double click occur simultaneously, and after the event type mouseup otherwise.

Related WPT: https://wpt.fyi/results/uievents/click/dblclick_event_mouse.html

The first naive approach was just to modify void WebContentView::mouseDoubleClickEvent(QMouseEvent* event) in Ladybird Qt Chrome. I did that, but after that I released that as this is a web spec, and it should be uniform across platforms, a check should be somewhere in multiplatform code. The question is - where?

Any suggestions or fixes are appreciated

Operating system

macOS

Steps to reproduce

  1. Open Ladybird
  2. Open linked WPT or any page that depends on double click
  3. Observe

Expected behavior

dblclick is dispatched only after a click event or an mouseup event

Actual behavior

dblclick is dispatched immediately

URL for a reduced test case

https://wpt.fyi/results/uievents/click/dblclick_event_mouse.html

HTML/SVG/etc. source for a reduced test case

N/A

Log output and (if possible) backtrace

N/A

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.
@AtkinsSJ AtkinsSJ added bug Something isn't working web compatibility labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web compatibility
Projects
None yet
Development

No branches or pull requests

2 participants