-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify active EditContext behavior (#60)
Fix several issues related to the active EditContext and updates with Text Input State. - Currently the "active EditContext" concept is nebulous: it's not clear whether it's per-user-agent, per-document, etc, and the reference to a "cached active EditContext" in https://w3c.github.io/edit-context/#update-the-editcontext is not well defined. In this PR, define that it's per-document, which seems to work well with how focus is managed in documents and is compatible with the behaviors we've already tried to specify. What we really want to end up with is to have at most one active EditContext per [top-level traversable navigables](https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-traversable), but [top-level traversable navigable](https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-traversable) is not really its own type and [navigable](https://html.spec.whatwg.org/multipage/document-sequences.html#navigable) isn't typically used to store this kind of thing. - Perform some plumbing through various algos so they use the one from the document receiving input rather than the generic "active EditContext". - Change the update of the Text Edit Context in the Update the Rendering steps to happen in a posted task per feedback in #41 . - Also update the active EditContext at that time if there were focus changes. - Remove a `dirty flag` and `character bounds updated flag` that are never set anywhere and don't seem to be necessary.
- Loading branch information
Showing
1 changed file
with
74 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters