-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Decorations should not be mutable #2634
Comments
|
@gdehmlow not sure about how we can fix the original issue but the amendment is actually a non issue. it looks like it come back from the grave because it's decorating
at the very start of |
IMHO that is your job. You should reevaluate decorations in onChange hook Decorations should mutate it's focus and anchor points when edited (like they do now). This is actually very desirable and I am using this functionality to mark sections of my document. So when a user modifies a section of the document I still maintain the correct start and end points of the section. The same applies to collaborative cursors - e.g. if you edit inside someone's selection Also the bug described doesn't seem to exist anymore in the recent annotation update |
As of #3093 (which was just merged), I believe this issue is no longer applicable, because a lot has changed. I'm going through and closing out any potential issues that are not out of date with the overhaul. Thanks for understanding. |
Do you want to request a feature or report a bug?
Bug
What's the current behavior?
Take the search highlighting example. Enter a search term. Select the end of the highlighted word and type.. the highlight continues as the decoration is appended to:
Likewise, if you hit enter, both lines become highlighted:
What's the expected behavior?
Modifying decorated text should re-evaluate the decorations and ensure that they are valid.
The text was updated successfully, but these errors were encountered: