-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Linebreak space when space-as-offset is used. #41
Comments
Right, I'll do that. |
Thanks 👍 |
I cannot reproduce it, there should already a newline character there. |
I can still produce it (only on mobile devices). Obvious fix is to introduce space between line div. Probably you may close it as it might be not relevant for some usecases. |
I guess it's a bug of the browsers then, I remember that for div, a 'newline' should be appended by the browser. |
I'd encourage to re-open this. As of Firefox 22 it can be now reproduced in both firefox and webkit based browsers. To repeat it, select text (multiline) and paste it. Last word would overlap with first work of newline. |
@iapain Let me try again. |
@iapain I cannot reproduce it, e.g. |
@coolwanglu See this attached screenshot. I tried this demo.pdf as well and I was able to repeat it. Steps:
|
@iapain Which browser are you using? |
@coolwanglu That screenshot is from Firefox 22 but I can also repeat it on Google Chrome 27 |
@iapain As we've discussed before, this has always been the behaviour of Chrome. For Firefox 22, I've just tested on Windows and Linux (Ubuntu), If you select the text and paste them to a multi-line text editor, you will see the line breaks, but if you paste them to the location bar, the Linux version will consume all the line breaks, and the Windows version will convert them into whitespaces. So I think it's how the location bar handles the line breaks, but the line breaks are there. Can you please verify this? |
@coolwanglu You're right about Firefox but still it fails on both WebKit based browsers and IE 9/10. Looks like: In my opinion we should unify this behaviour. |
@iapain This is indeed an issues, and I'll reopen it. But I don't have a good solution right row. |
@coolwanglu I will try to patch this bug. |
@iapain Thanks! Maybe we can discuss about your solution before you implement it. |
@coolwanglu Possible solution is to get rid of newline char as in HTML it has no or little influence and substitute it with proper HTML equivalent. Do you have a better idea? |
@iapain I think you can add a |
@coolwanglu |
@iapain We should never modify the content unless necessary. When you see a char Also in PDF file there are rarely actually line break characters, afaik, instead text are simply repositioned with a PDF instruction. |
@coolwanglu You're correct about that but I found much more simpler way. It'd be great if you can test it with IE. I have tested it with gecko and webkit. |
@iapain No it didn't work. I've tested on Firefox and Chrome on Windows. |
How about using & n b s p ; before every < / d i v>? (it is a workaround but worked for me) |
At EOL a soft space should be added so that text selection works smoothly.
The text was updated successfully, but these errors were encountered: