spiegel-keyman/web/source/dom
Marc Durdin b05fda1c6a fix(web): selection direction and tests
Selection direction was not maintained in mutations, which could have
unexpected consequences. Added support for selection direction to input
and textarea.

The functions `getTextBeforeCaret()` and `getTextAfterCaret()` are named
somewhat incorrectly, as they actually get the text before and after the
active selection (and a collapsed zero-length selection is equivalent to
the caret). It would be worth renaming these in a future refactor.

This PR fixes the unit tests so that caret position is tested correctly
with an active selection -- the caret can be at either the start or the
end of the selection, corresponding with the direction in which the user
originally selected the text. It also fixes the assumptions around the
above named functions for `input` and `textarea` types.

Note that selection interactions are still buggy with prediction
selections; these bugs were present in 15.0.118-alpha and I will tackle
them in an upcoming commit.
2022-02-23 15:13:07 +11:00
..
targets fix(web): selection direction and tests 2022-02-23 15:13:07 +11:00
domDefaultOutput.ts refactor(web): roots out embedded-tab code from source branch 2021-08-05 12:13:03 +07:00
domEventHandlers.ts Merge pull request #5963 from keymanapp/feat/web/3621-newcontext-group 2022-01-17 12:04:29 +11:00
domManager.ts Merge pull request #5963 from keymanapp/feat/web/3621-newcontext-group 2022-01-17 12:04:29 +11:00
domOverrides.ts fix(web): add readonly mode for rule behavior finalization 2022-02-22 10:42:20 +11:00
preProcessor.ts feat(web): basic support for newContext 2021-11-23 15:00:47 +11:00
touchAliasElement.ts chore(web): removes diagnostic breadcrumbing 2021-05-24 10:59:54 +07:00
utils.ts refactor(web): activeElement, lastActiveElement as properties 2021-09-01 09:44:01 +07:00
variableStoreCookieSerializer.ts fix(web/engine): unit-test check for saveStore 2020-04-01 09:55:43 +07:00