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

Firefox adds extraneous <br> tags to output stream, but not Safari #999

Closed
SkipperHosting opened this issue Jul 13, 2019 · 1 comment
Closed
Labels
bug:core Bug in core (trumbowyg.js) wontfix
Milestone

Comments

@SkipperHosting
Copy link

SkipperHosting commented Jul 13, 2019

Using FF to edit a trumbowyg instance will result in extra <br> tags being inserted in the final output. This does not happen with at least Safari (both on OSX).

Tested on OSX with current public FF68, FFdev69, and Safari 12
Tested against both the trumbowyg main demo (https://alex-d.github.io/Trumbowyg/demos/) and a local barebones instance of the current github code.

With public Trumbowyg demo:

Using Safari...

  1. Click show HTML
  2. => the output is as expected, each line wrapped in a <p> pair
  3. Click to insert text caret at the very end of the text body
  4. type a few letters
  5. Click show HTML
  6. => output as expected
  7. Repeat putting caret at end of text
  8. Press enter to add carriage return
  9. Type some text on the new line
  10. Add a second carriage return and a few more bits of text
  11. Click show HTML
  12. => output is as expected (this is where the output changes for FF)

Using FF68/FFdev69...

  1. follow same steps as above
  2. => everything is the same until the very last result that this now includes an extraneous <br> in the last paragraph.

This is just one set of steps to get the <br> to appear. Most any random usage in FF will cause the extra line break to be left in the output.

As mentioned, this behaves the same with a completely bare-bones test install with no plugins.

@Alex-D Alex-D added bug:core Bug in core (trumbowyg.js) wontfix labels Jul 14, 2019
@Alex-D Alex-D added this to the v3.0 milestone Jul 14, 2019
@Alex-D
Copy link
Owner

Alex-D commented Jul 14, 2019

Hey, thank you for you detailed issue!

I'm sorry about that kind of bugs, but they are from browsers, not Trumbowyg since it's based on contenteditable.

Trumbowyg v3 (see #875) will not be based on the contenteditable/execCommand API and will fix this kind of issues, but not before few months, maybe spring 2020 or later, don't know for now when it will be ready.

@Alex-D Alex-D closed this as completed Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:core Bug in core (trumbowyg.js) wontfix
Projects
None yet
Development

No branches or pull requests

2 participants