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

Remove text selection from the dblclick default action - #328 #329

Merged
merged 4 commits into from May 9, 2023

Conversation

flackr
Copy link
Contributor

@flackr flackr commented Jun 24, 2022

Text selection begins on all browsers on the mousedown event (consistent
with OS text selection), allowing extending the selection by continuing
to drag. The dblclick event is too late to prevent text selection, so we
should remove this default action to prevent confusion.

Mousedown already includes text selection as a possible default action
in the note.

Closes #328

The following tasks have been completed:

  • Confirmed there are no ReSpec/BikeShed errors or warnings.
  • Modified Web platform tests: Selection is not a required behavior of mousedown, so it is unclear whether it should be tested.

Implementation commitment:

This is already the current behavior on WebKit, Chromium and Gecko.

Text selection begins on all browsers on the mousedown event (consistent
with OS text selection), allowing extending the selection by continuing
to drag. The dblclick event is too late to prevent text selection, so we
should remove this default action to prevent confusion.

Mousedown already includes text selection as a possible default action
in the note.
Copy link
Member

@mustaqahmed mustaqahmed left a comment

Choose a reason for hiding this comment

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

This looks good, thanks. In addition to matching the spec with the de-facto behavior, this change also makes the spec consistent with itself 😄: the "Default Action" row in the top part of Section 5.3.4.4 already had "none"!

Asking for a related change elsewhere.

sections/event-types.txt Show resolved Hide resolved
@mustaqahmed mustaqahmed self-requested a review June 24, 2022 16:18
@garykac garykac merged commit 01d97fd into w3c:main May 9, 2023
2 checks passed
github-actions bot added a commit that referenced this pull request May 9, 2023
SHA: 01d97fd
Reason: push, by garykac

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mangwu added a commit to mangwu/uievents-cn that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove dblclick text selection default action to match browsers
3 participants