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

Newline at end of text does not display correctly in textbox #4798

Closed
minzojian opened this issue Mar 9, 2018 · 3 comments · Fixed by #4802
Closed

Newline at end of text does not display correctly in textbox #4798

minzojian opened this issue Mar 9, 2018 · 3 comments · Fixed by #4802

Comments

@minzojian
Copy link

minzojian commented Mar 9, 2018

Version

2.2.0

Test Case

http://jsfiddle.net/minzojian/4c2bs1b8/2/

Steps to reproduce

case1:
just add a simple textbox and write some words
then press enter key to break lines
case2:
add some style for selection,like change the color of it
in the end of the word, press enter

Expected Behavior

case1:
new line can created correctly
case2:
new line should keep the style of prev character

Actual Behavior

case1:
only one new line created and besides the textbox's height is not ok
case2:
style of new line just lost last style

i displayed the hidden textarea, as you press enter key, you can see new lines ceated in the textarea,but there is no new line ceated in textbox

@redlive
Copy link

redlive commented Mar 9, 2018

+1

@asturur asturur changed the title textbox press enter key didn't create new line correctly, style lost too Newline at end of text does not display correctly in textbox Mar 11, 2018
@asturur
Copy link
Member

asturur commented Mar 11, 2018

fixed with incoming PR.
The loss of style is normal in those cases in fabricJS.
There is not yet a current style logic in fabricJS.

@asturur
Copy link
Member

asturur commented Mar 12, 2018

no the style when hitting new line is empty, i think it has always been like that. was different in 1.7?

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

Successfully merging a pull request may close this issue.

3 participants