ngx-editor icon indicating copy to clipboard operation
ngx-editor copied to clipboard

[BUG]: Firefox - Text align justify

Open weblink-pd opened this issue 3 years ago • 4 comments

I'm submitting a Bug report

  • [ ] Regression (a behavior that used to work and stopped working in a new release)
  • [x] Bug report
  • [ ] Enhancement
  • [ ] Feature request
  • [ ] Documentation issue or request

Description

Text align justify doesn't work. When selecting the icon to justify text stays unchanged in editor.

Version Information

ngx-editor: 10.0.0
angular: 12.0.3

Browser

Mozilla Firefox - 89.0.1

weblink-pd avatar Jun 21 '21 12:06 weblink-pd

This seems to be a Firefox bug, Firefox text-align:justify is not working with white-space: pre-wrap on its parent. See https://bugzilla.mozilla.org/show_bug.cgi?id=1253840. The editor uses Prosemirror under the hood, which needs pre-wrap to be set for functioning properly.

This is just for the editor. End users should see no issues though. Since the white-space property is just for the editor.

For now may be you can override the css property by

.NgxEditor__Content {
 white-space: normal;
}

Mostly you should see no differences, there are very few edge cases but it is rare.

sibiraj-s avatar Jun 21 '21 14:06 sibiraj-s

white-space:normal. doesn't work. I tried it before posting the issue. When it's set to normal it removes every space between words. Pressing spacebar adds whitespace and it's gone in the same time. I end up with one long word instead justified text

weblink-pd avatar Jun 21 '21 17:06 weblink-pd

white-space:normal. doesn't work. I tried it before posting the issue. When it's set to normal it removes every space between words.

Yeah. I thought it would be edgy, but ProseMirror needs it.

Since this is a browser issue, I guess it can't be fixed. I am open to workarounds as long as it doesn't alter the output DOM structure.

sibiraj-s avatar Jun 22 '21 07:06 sibiraj-s

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Apr 12 '22 17:04 github-actions[bot]

The issue appears to be fixed now https://bugzilla.mozilla.org/show_bug.cgi?id=1253840.

sibiraj-s avatar Jul 15 '23 09:07 sibiraj-s