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

Regular space characters are being stripped from text input #29

Closed
viewfromthesky opened this issue Aug 21, 2020 · 3 comments
Closed

Regular space characters are being stripped from text input #29

viewfromthesky opened this issue Aug 21, 2020 · 3 comments
Labels

Comments

@viewfromthesky
Copy link

viewfromthesky commented Aug 21, 2020

Tested using quasar-tiptap 1.4.4 (tiptap 1.27.1/tiptap-extensions 1.29.1) and then 1.5.0 (tiptap 1.29.6/tiptap-extensions 1.32.5). Discovered as a bug that was only replicable on Firefox, but exists due to a difference in how Chrome and Firefox handle spacebar input. Chrome will input a non-breaking space, but Firefox will input a regular space character.

At the end of a string (your current input), any regular space characters that exist will be stripped as the next character is typed. When trying to paste a single space character at the end of a line, it will not commit in either browser. This behaviour is also replicable in the demo page you provide.

mekery pushed a commit that referenced this issue Aug 22, 2020
## [1.5.1](https://github.com/donotebase/quasar-tiptap/compare/@1.5.0...@1.5.1) (2020-08-22)

### Bug Fixes

* **prosemirror-model:** multiple versions of prosemirror-model, fixed [#29](#29) ([a293fd1](a293fd1))
@mekery
Copy link
Contributor

mekery commented Aug 22, 2020

🎉 This issue has been resolved in version 1.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@viewfromthesky
Copy link
Author

I don't believe this release actually has done it; the commit shows you added a new package and changed the white-space setup, but the HTML is still being trimmed so it's still not possible to add spaces at the end of a line. Specifically this is the output from getHTML(), as used in the example here:

  methods: {
    onUpdate ({ getJSON, getHTML }) {
      this.json = getJSON()
      this.html = getHTML()
      console.log('html', this.html)
    }
  }

If onUpdate() is called, it is normally called twice but, if you input a space character, it is called three times; once while returning the content with your space character and then another two more times without it.

@mekery
Copy link
Contributor

mekery commented Oct 5, 2020

I don't believe this release actually has done it; the commit shows you added a new package and changed the white-space setup, but the HTML is still being trimmed so it's still not possible to add spaces at the end of a line. Specifically this is the output from getHTML(), as used in the example here:

  methods: {
    onUpdate ({ getJSON, getHTML }) {
      this.json = getJSON()
      this.html = getHTML()
      console.log('html', this.html)
    }
  }

If onUpdate() is called, it is normally called twice but, if you input a space character, it is called three times; once while returning the content with your space character and then another two more times without it.

Just realized that you replay after I closed this issue.
Would you try the latest release (1.7.0), I tested it and the space works as normal.

yoshidev0428 added a commit to yoshidev0428/quasar_modis that referenced this issue Jun 25, 2023
## [1.5.1](https://github.com/donotebase/quasar-tiptap/compare/@1.5.0...@1.5.1) (2020-08-22)

### Bug Fixes

* **prosemirror-model:** multiple versions of prosemirror-model, fixed [#29](donotebase/quasar-tiptap#29) ([a293fd1](donotebase/quasar-tiptap@a293fd1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants