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

Content Model: Selection Range become Marker after formatContentModel #2504

Closed
miku1958 opened this issue Mar 13, 2024 · 3 comments
Closed

Comments

@miku1958
Copy link
Contributor

Describe the bug
Selection Range will become Marker and the Marker has wrong position after formatContentModel when the Editor is not focusing

To Reproduce
Steps to reproduce the behavior:

  1. Enable Content Model
  2. Add a timer, in the timer's action, use formatContentModel to replace its paragraphs's content(necessary) and change the selected segment.
  3. Unfocusing the editor, e.g. switching to another app
  4. Wait for the timer.

Expected behavior
Paragraphs has been updated(This is correct),
The Selection also been updated(This is incorrect).

Device Information

  • OS: macOS
  • Browser WebKit
  • Version 14.4

Additional context
Add any other context about the problem here.

@JiuqingSong
Copy link
Collaborator

| Add a timer, in the timer's action, use formatContentModel to replace its paragraphs's content(necessary) and change the selected segment.

Please attach your code how you replace the paragraphs. We need a exact repro step. If possible, please build a online repro using any online js tools such as code pen.

@JiuqingSong
Copy link
Collaborator

@miku1958 can you help confirm if this still happen in latest build?

Thanks

@JiuqingSong
Copy link
Collaborator

In recent build the selection code got changed a lot. If you can still repro in latest build (v9.0 and later), please reactivate. Thanks.

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

2 participants