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

1 linebreak become 3 when pasted into the text field #134

Closed
nurps opened this issue Mar 6, 2017 · 4 comments
Closed

1 linebreak become 3 when pasted into the text field #134

nurps opened this issue Mar 6, 2017 · 4 comments
Labels
bug It's a bug! good first issue If you want to get your hands dirty, this is a good start!

Comments

@nurps
Copy link

nurps commented Mar 6, 2017

If i copy and paste a text with a normal single line break. It looks normal in die text entry field of Threemaweb, but after sending I get 3 empty lines instead of just one. Looks terrible and ist annoying for longer texts.

@dbrgn
Copy link
Contributor

dbrgn commented Mar 6, 2017

I cannot reproduce this, neither in Chromium nor in Firefox.

Can you let us know what browser and OS you're using? And give us steps we can follow to reproduce this issue? (That's what the issue template is for that you deleted when creating this issue.)

@dbrgn dbrgn added cannot reproduce Not able to reproduce bug It's a bug! labels Mar 6, 2017
@nurps
Copy link
Author

nurps commented Mar 6, 2017

I have a text file created with Windows10 notepad containing something like:

"Test test,

test test test test."

Copied that into Chrome Threema and it became 3 empty lines after sending, but shows with one line (correctly) in the text field before sending.

@dbrgn
Copy link
Contributor

dbrgn commented Mar 6, 2017

Ah. Then it must be related to Windows line endings... 🙄

Thanks for reporting.

@dbrgn dbrgn removed the cannot reproduce Not able to reproduce label Mar 6, 2017
@IndianaDschones
Copy link
Contributor

I did some investigations. Chrome handels the input different to Firefox:

This is the text with CR/LF on Windows (inputFromWindows.txt):

text-npp

This is the text pasted in the Chrome textfield

text-chrome

and in the Firefox textfield

text-firefox

Hope this helps solving the issue because only Chrome adds additional linebreaks.

My System
Windows 8.1 64-Bit
Chrome 56.0.2924.87
Firefox 51.0.1 (64-Bit)

@dbrgn dbrgn added the good first issue If you want to get your hands dirty, this is a good start! label Mar 7, 2017
dbrgn added a commit that referenced this issue May 17, 2017
Fix line breaks when pasting

Fixes #134.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug! good first issue If you want to get your hands dirty, this is a good start!
Development

No branches or pull requests

3 participants