-
Notifications
You must be signed in to change notification settings - Fork 30
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
Selection.direction spec issue, what should happen on multiple click? #177
Comments
WebKit also returns none. I'd be rather worried this would be a breaking change. |
Yes, it would be a breaking change, but since it does not work properly in Gecko (bug report), nor Webkit (bug report) and it hasn't shipped to chromium yet, I don't think that it would currently break any website. My concern is, that I do believe that the only use case where the I've been actively working on a |
If I understand from the WebKit bug, to match macOS conventions, the selection should be directionless in more cases than what the spec currently requires. I think it makes sense to match platform conventions, which suggests changing the spec to allow more flexibility. |
Given Simon's comment this should prolly remain open. |
Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116
Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5677331 Commit-Queue: Di Zhang <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1324573}
Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5677331 Commit-Queue: Di Zhang <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1324573}
Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5677331 Commit-Queue: Di Zhang <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1324573}
Generally which nodes are selected with double/tripple clicks are implementation specific, so if we use the selected nodes to determine the direction, then it would be non-interoperable. So likely the only interoperable solution would be returning "none" here? |
…ction, a=testonly Automatic update from web-platform-tests [Selection API] Implement selection.direction Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5677331 Commit-Queue: Di Zhang <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1324573} -- wpt-commits: 15c5ae88f39e8599f9b03ee523ddd4f89ab269d0 wpt-pr: 47043
…ction, a=testonly Automatic update from web-platform-tests [Selection API] Implement selection.direction Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5677331 Commit-Queue: Di Zhang <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1324573} -- wpt-commits: 15c5ae88f39e8599f9b03ee523ddd4f89ab269d0 wpt-pr: 47043
Add selection.direction [1] which returns "none", "forward" or "backward". We also update the WPT test selection-direction.tentative.html to remove the selection click-based tests as this behavior is not standardized across browsers [2] [3]. [1] https://w3c.github.io/selection-api/#dom-selection-direction [2] w3c/selection-api#70 (comment) [3] w3c/selection-api#177 (comment) Change-Id: I2aad4f8efc4f3d700437501929af274116f7910a Bug: 40286116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5677331 Commit-Queue: Di Zhang <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1324573}
Based on the documentation, it only specifies the
Selection.direction
based on the position of the boundary-points.Selection.direction
The spec does not mention what should happen in case of double or triple click, when a whole word/line is selected.
The Mozilla's position is that the
direction
should be"none"
in case of double-click, since it does not involve any direction.Bugzilla: Selection.direction's value is incorrect
My opinion is that the
direction
would be useful if its value were calculated based on the positions of the boundary points, because I don't see any advantage of knowing whether the selection was made by mouse dragging or multiple-click.The text was updated successfully, but these errors were encountered: