Updating content externally or using DynamicFormControlComponent causes the cursor to jump to the start

Open
#425 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
angular, typescript
Domain
frontend

Research direction

Start with the linked CodeSandbox and reproduce the cursor jump while typing, using DynamicFormControlComponent, and during an external subscription update. Trace the Angular component's value-update handling; done means each update preserves the cursor position instead of moving it to the start, including on Angular 13 and latest.

Written by the indexing model from the issue text.

Description

Updating content externally or using DynamicFormControlComponent to update the value causes the cursor to jump to the start of the rich text editor. This issue also happens if there is another subscription firing to update the value somehow while typing

https://codesandbox.io/s/tinymce-angular-forked-sdwgoj

while typing it should not jump to the start, updating the value externally should not jump to the start, and after updating the value it should not jump to the start

Version 6.0.0 on Angular 13 and latest

Dominant language
TypeScript
Stars
346
Forks
94
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tinymce/tinymce-angular

All issues in tinymce/tinymce-angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.