Files
anki/ts
Luc Mcgrady 9a63b95230 Fix: text input refocues when list item shortcuts are pressed (#5007)
<!--
Title (for the Pull Request title field at the top):
Use a short prefix so the change type is obvious. You do not need to
repeat it in the body below.

Examples:
- fix: — bugfix
- feat: — feature
- refactor: — internal change without user-facing feature
- docs: — documentation only
- chore: — tooling, CI, deps, build housekeeping
- test: — tests only
-->

## Linked issue (required)

<!-- Fixes #123 / Closes #123 / Refs #123 -->
fixes #5006

## Steps to reproduce (required, use N/A if not applicable)

<!-- Steps to reproduce: how to trigger the bug in the broken state (the
"before").
 - Mainly for bugfixes;
    - For bugs: numbered steps before the fix. For non-bugs: write N/A.
 - use N/A for features, refactors, docs, chore, etc.
-->

> I. Undo duplication
> 
> (1) Write into the editor “line”.
> 
> (2) In the non html editor, select this line, then press the
unordered/ordered list button in the tool bar (or use keyword shortcut);
the html field of the editor becomes
> 
> ```
> <ol><li>line</li></ol>
> 
> ```
> 
> (3) Press the undo shortcut (command + Z on Mac)
> 
> Result: the list is still there, but its content is duplicated after
the list; the html field reads:
> 
> ```
> <ol><li>line</li></ol>line
> 
> ```
> 
> Remark: the same bug occurs when we begin with multiple lines instead
of just one.

## How to test (required)

<!--- How to test: how you verified the change (checks, unit tests,
manual steps, edge cases — the "after" or general validation). --->
Follow the reproduction steps. Undo should remove the text in the order
that it appeared.

### Checklist (minimum)

- [X] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

## Risk / compatibility / migration (optional)

<!-- Breaking changes, rollout notes, or N/A for small / low-risk PRs
-->

Undoes some of the behaviour from #3483. I couldn't reproduce the bug he
mentioned with this patch but I'm not entirely sure this doesn't re
introduce https://github.com/ankitects/anki/issues/3338 as a bug.

## Scope

- [X] This PR is focused on one change (no unrelated edits).
2026-06-22 18:30:13 +03:00
..
2024-03-31 09:16:31 +01:00
2021-04-22 19:19:39 +02:00
2024-03-31 09:16:31 +01:00
2022-12-04 11:37:16 +10:00
2024-05-17 17:11:28 +07:00
2022-11-27 15:24:20 +10:00
2024-03-31 09:16:31 +01:00

Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.

To update all dependencies:

./update.sh

To add a new dev dependency, use something like:

./add.sh -D @rollup/plugin-alias