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

Spaces not preserved on cut/paste in Quill #1280

Closed
mmmmmmaya opened this issue Jan 19, 2017 · 6 comments
Closed

Spaces not preserved on cut/paste in Quill #1280

mmmmmmaya opened this issue Jan 19, 2017 · 6 comments

Comments

@mmmmmmaya
Copy link

mmmmmmaya commented Jan 19, 2017

If I type testing testing with one "regular" space (char#32) and one non-breaking space (char#160) between the words, then when I cut/paste this message the regular is preserved but the nbsp is not preserved.

Steps for Reproduction

  1. Visit http://codepen.io/ainjii/pen/egvJQG?editors=0010
  2. Enter a message with both regular and non-breaking spaces in the middle into the message box.
  3. Cut/paste the message from/to quill.
  4. Compare text in console before/after replacement applied.
  5. Note some spaces have been removed.

Expected behavior:
Both spaces are kept when I cut/paste this message.

Actual behavior:
Half the spaces are removed with each cut/paste cycle until only a single regular space remains. In the case where there is only one nbsp, it is not removed, though it is converted into a regular space.

Platforms:
Mac OS Sierra, Google Chrome Version 55.0.2883.95 (64-bit)

Version:
Quill version 1.1.9

@mmmmmmaya mmmmmmaya changed the title Only non-breaking spaces preserved on cut/paste in Quill Spaces not preserved on cut/paste in Quill Jan 19, 2017
@benbro
Copy link
Contributor

benbro commented Jan 22, 2017

Related #996

@mmmmmmaya
Copy link
Author

mmmmmmaya commented Feb 2, 2017

@jhchen Did you get a chance to take a look at this/the PR? I would love any comments or feedback.

@jhchen
Copy link
Member

jhchen commented Feb 6, 2017

It's not clear changing the white-space property is safe from side effects. Also how exactly do you enter a non-breaking space from the keyboard?

@mmmmmmaya
Copy link
Author

In most user cases, non-breaking spaces will be added when the user is copy/pasting from a source that uses non-breaking spaces in their HTML. If you are just trying to test using an Apple computer, you can also add a non-breaking space from the standard US keyboard by typing option+space.

@spectras
Copy link

spectras commented Sep 13, 2017

And on my system, one enters a non-breaking space using win+space.

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

No branches or pull requests

5 participants