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

Copy and paste of text with formatting causes style map reference error #3500

Closed
adrianmawer opened this issue Dec 5, 2016 · 0 comments · Fixed by #3502
Closed

Copy and paste of text with formatting causes style map reference error #3500

adrianmawer opened this issue Dec 5, 2016 · 0 comments · Fixed by #3502

Comments

@adrianmawer
Copy link

Version

1.6.6

Test Case

https://jsfiddle.net/adrianmawer/afftoutf/

Steps to reproduce

See screen cast: http://youtu.be/VgGit4W7Lyc

  1. in a fabric.Textbox, highlight/select some text and apply some formatting e.g. underline.
  2. highlight/select the formatted text, copy it then paste it at the end of the line.
  3. highlight the text that was originally underlined in step 1, remove underline formatting and observe that the pasted text also has its underlining removed. This is unexpected. Only the highlighted text should have its underlining removed.

Expected Behavior

Only the highlighted/selected text gets new formatting applied in its character style mapping

Actual Behavior

The pasted text received the new formatting too because the underlying style map entries are copied by reference instead being cloned.

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

Successfully merging a pull request may close this issue.

1 participant