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

[IText] style duplication on inserting new line #2188

Closed
milan-w opened this issue May 12, 2015 · 2 comments · Fixed by #2193
Closed

[IText] style duplication on inserting new line #2188

milan-w opened this issue May 12, 2015 · 2 comments · Fixed by #2193

Comments

@milan-w
Copy link
Contributor

milan-w commented May 12, 2015

Given the following situation: a text has mutliple lines. One line has styles, the preceding and the following line have no styles. If a new line is inserted somewhere before the line with styles, the styles get duplicated on the preceding line.

This is due to the function shiftLineStyles copying styles from line to line +1 but never overwriting or deleting the old style.

See http://jsfiddle.net/cygvj607/1/ (the fiddle shows two fixes, the error can be seen when clicking "fixed insertNewlineStyleObject")

@asturur
Copy link
Member

asturur commented May 12, 2015

Can i ask you on which version are you making tests?
Because AFTER 1.5.0 we changed style handling.

Did you check on latest code?

@milan-w
Copy link
Contributor Author

milan-w commented May 12, 2015

Yes, all tests are made on the latest master (1.5.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants