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

Selection #2

Open
jgraham opened this issue May 19, 2022 · 9 comments
Open

Selection #2

jgraham opened this issue May 19, 2022 · 9 comments

Comments

@jgraham
Copy link
Contributor

jgraham commented May 19, 2022

Selection, including where it's possible to put the caret, is an area that's been identified as high impact for editor authors. In particular the following questions:

  • What are the legal caret positions?
  • How does selection interact with non-selectable elements?
  • How does selection interact with shadow dom?

For the caret position, we have some existing spec text that calls out some special cases: https://github.com/w3c/contentEditable/blob/ba10fb177f68567ff742d0acb6caab337224af2d/index.html#L145-L187

So as part of this investigation we should:

  • Figure out how much of this is already covered by relevant specifications and ensure that any gaps are reported and able to be addressed
  • Figure out where we already have test coverage, and where we don't add additional test coverage.
  • Ensure that everyone agrees that the expected results of the tests match the specification and the desired behaviour.

The aim is that the identified tests would be a candidate for an Interop 2023 focus area that browsers would be able to commit to.

@jgraham
Copy link
Contributor Author

jgraham commented May 19, 2022

Please let me know if the summary as written isn't right, doesn't cover something important, or covers something it shouldn't.

@jgraham
Copy link
Contributor Author

jgraham commented Jun 15, 2022

WICG/webcomponents#79 seems to be the shadow root selection issue. The last action was @mfreed7 suggesting that they were planning to look at putting up spec PRs early/mid 2022. Unless there's a significant change in the status there I'd propose we make those PRs and some accompnying tests part of the concrete goals for this effort.

@travisleithead
Copy link

Note, the Intl.Segmenter is a very good way to get "legitimate" caret locations within a string (e.g., keeps grapheme clusters together, also helps with "word" navigation).

@johanneswilm
Copy link

Selection tests have been submitted here: web-platform-tests/wpt#35862

@jgraham
Copy link
Contributor Author

jgraham commented Oct 19, 2022

So we have a test PR, with some feedback. Do we believe that merging that PR completes all the selection work we were hoping to achieve as part of this investigation?

@johanneswilm
Copy link

As far as I can tell, the issues addressed in this PR do in fact correspond to the main selection issues editors are currently having. I have not received any feedback from other editors to the contrary either.

@jgraham
Copy link
Contributor Author

jgraham commented Oct 20, 2022

Updating the score here to 50% per the meeting.

@jgraham
Copy link
Contributor Author

jgraham commented Oct 20, 2022

Next step is review of the test PR; if that lands then this area will be complete.

@jgraham
Copy link
Contributor Author

jgraham commented Dec 15, 2022

The test PR landed, so I propose we score this as 100%.

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

No branches or pull requests

3 participants