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

Inline Justify text not reflected in editor #32648

Closed
pauljacobson opened this issue Apr 29, 2019 · 38 comments
Closed

Inline Justify text not reflected in editor #32648

pauljacobson opened this issue Apr 29, 2019 · 38 comments
Assignees
Labels
[Closed] Resolved Issue is resolved. Use for issues that can be closed but did not have an explicit fix with a PR. [Feature] Post/Page Editor The editor for editing posts and pages. [Interaction #] > 10 (Automated) interaction count label for better visibility. Please don't add these manualliy. Jetpack [Platform] Atomic [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug

Comments

@pauljacobson
Copy link

pauljacobson commented Apr 29, 2019

Update 2023-04-05 - This issue was closed as completed on Feb 26, 2021, but was reopened on Dec 25, 2022, and user reports have been steadily coming in since then. Please see my latest comment for newest triage/scrubbing notes.


Older notes

Update Nov 18, 2019: This is now broken only for Atomic sites on all browsers.

This is feedback on an issue I came across while testing Jetpack v7.3-alpha-9688-g91a3f01 (also happens in WPCom Simple)

This is currently broken for Simple, Jetpack and Atomic sites, but only in Firefox and only in the Editor.

Steps to reproduce

Update 2023-04-05 as previous report did not include steps, and included now-expired screenshots

  1. Open page or post and add text in a paragraph block
  2. Use the block's floating toolbar to Justify
  3. Save the content and view the live site

What I expected

The paragraph to appear justified in the editor, and the "Justify" button in the menu to be highlighted

What happened instead

Text appears justified in the live site, but the editor does not reflect the change. The only change seen in the editor is the floating toolbar's v icon is highlighted, indicating a change has been made there.

Markup on 2023-04-05 at 15:07:59

Markup on 2023-04-05 at 15:08:12

@pauljacobson pauljacobson added [Type] Bug [Feature] Post/Page Editor The editor for editing posts and pages. [Pri] Normal Schedule for the next available opportuinity. Testing labels Apr 29, 2019
@mattwiebe mattwiebe self-assigned this May 30, 2019
@mattwiebe mattwiebe added [Pri] Low Address when resources are available. and removed [Pri] Normal Schedule for the next available opportuinity. labels May 31, 2019
@mattwiebe
Copy link
Contributor

Firstly, underline is working fine. The red spellcheck dots seem to be obscuring it in the editor. I'm going to edit out that portion for clarity.

Secondly, the justified text is oddly broken, but only in Firefox, and only in the Editor. Having devtools open shows that the paragraph is receiving the correct inline style attribute but it's not reflected in the editor:

Screen Shot 2019-05-31 at 16 32 48

The same behaviour was observed on both Jetpack and WPCom Simple, which is to be expected given that both rely on the same script.

Given that this is only affecting Firefox and a little light Googling didn't turn up any results, I'm going to bump this to lower priority.

@mattwiebe mattwiebe changed the title Editor: Inconsistent underlining and justify text behavior Editor: Justify text not working in Firefox May 31, 2019
@mmtr
Copy link
Member

mmtr commented Jun 8, 2019

According to this, it seems that the white-space: pre-wrap style is causing the issue.

Screen Shot 2019-06-08 at 12 36 14

@gwwar gwwar changed the title Editor: Justify text not working in Firefox Editor: Justify text not working in Firefox and Safari Jun 25, 2019
@gwwar
Copy link
Contributor

gwwar commented Jun 25, 2019

If this rule is coming from Gutenberg we may need to make a PR to reduce CSS specificity for this case.

@tijosh
Copy link

tijosh commented Jun 28, 2019

Another report of this via WPcom ticket #2106996-zen

Please ping me when resolved so I can follow up with the user.

@tanjoymor
Copy link

Another report here: #2145106-zen

@gwwar gwwar removed the [Pri] Low Address when resources are available. label Sep 27, 2019
@gwwar gwwar changed the title Editor: Justify text not working in Firefox and Safari Editor: Justify text not working on Simple Sites Sep 27, 2019
@geekinthegirl
Copy link

One more report here: #15531608-zen

The user's going to check back in with us in a few days.

@susanjanec
Copy link

A report here 15496168-hc - in this case, the Justified option is applied to the text, but is not showing up on the user's site. Provided CSS as a workaround for now.

@smithkyle45
Copy link

smithkyle45 commented Sep 27, 2019

I had a report of this recently in 14764602-hc

I provided CSS as a workaround. I would like to notify them of the fix when available.

@mikeicode
Copy link

Another in 15020826-hc the class is added to the text but not applied. They say it stopped working the same day 6.5 was released.

@susanjanec
Copy link

Added new GH report regarding specific issue here - #36391

@chatoxz
Copy link

chatoxz commented Oct 5, 2019

Another #2398420-zen.

Fixed it with:

.has-text-align-justify{
   text-align: justify;
} 

@davipontesblog
Copy link
Contributor

Here is another report, on an atomic site running Gutenberg 6.6 plugin - #2414777-zen

@hacchism
Copy link

Another report: #2415200-zen
Gave them a CSS code as a temp solution.

@mmtr mmtr changed the title Editor: Justify text not working on Simple Sites Editor: Justify text not working on Simple Sites (Firefox) Oct 15, 2019
@mmtr mmtr changed the title Editor: Justify text not working on Simple Sites (Firefox) Block editor: Justify text not working (Firefox) Oct 15, 2019
@gwwar gwwar removed the Testing label Oct 22, 2019
@ccwalburn
Copy link

This is an instance where the justified text displays correctly in the editor, but not on the front end.

The user said that it worked when they added the text, but then after they edit it, it changes to left-justified. The issue can be seen on their home page.

I added CSS as a workaround:

.has-text-align-justify{
   text-align: justify;
} 

#2471641-zen

@mikeicode
Copy link

Another in 16387878-hc I gave the CSS fix for now.

@danielbachhuber danielbachhuber self-assigned this Feb 8, 2023
@danielbachhuber
Copy link
Contributor

I wasn't able to reproduce this my Simple site with the Livro Theme:

image

image

However, I was able to reproduce the issue in the site from 5866007-zd-woothemes

image

image

My Simple site seems to have the .has-text-align-justify CSS injected into the DOM:

image

There doesn't appear to be any equivalent in the user's site:

image

@danielbachhuber
Copy link
Contributor

I was able to reproduce this on my test Atomic site with the Jackson theme.

Here's where the .has-text-align-justify CSS is injected in Jetpack:

https://github.com/Automattic/jetpack/blob/210e75345653abee7954a11d3669cd56175b9ea5/projects/plugins/jetpack/modules/wpcom-block-editor/class-jetpack-wpcom-block-editor.php#L400-L407

It seems to make it into wp-block-library-inline-css:

image

However, it some how gets stripped off the end of the blob passed to the iframe:

image

image

Changing the priority for enqueue_block_assets doesn't seem to have an impact.

@danielbachhuber
Copy link
Contributor

Somewhat related #66474 (comment)

It seems like there's a history of related issues at the intersection of wp_add_inline_style() and the <iframe> editor https://github.com/WordPress/gutenberg/issues?q=is%3Aissue+wp_add_inline_style

@jamiepalatnik
Copy link

Encountered an issue with justify not working in editor or preview on a simple site, Varese theme.

I also tested on a simple test site with Bitácora theme active and was able to recreate this issue for a Paragraph block in a column, but justify worked when the Paragraph block was not in a column.

Chat: 41897993-hc

@tanjoymor
Copy link

Another case with Russell theme. Not working in editor, but applying the setting and updating does render it on the live site.

Chat: 33780387-hc

@cuemarie
Copy link

cuemarie commented Apr 5, 2023

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

  • Tested on Simple – Replicated
  • Tested on Atomic – Replicated
  • Replicable outside of Dotcom – Yes (feature powered by Jetpack plugin)

📌 FINDINGS/SCREENSHOTS/VIDEO

  • Across my test sites, I'm not seeing any editor changes when using the toolbar's Justify tool:

Screenshots/Recordings

Simple Site Example: Theme Livro - Editor

Screen.Capture.on.2023-04-05.at.14-55-45.mov

Atomic Site Example: Theme Zoologist - Editor

Screen.Capture.on.2023-04-05.at.14-58-13.mp4

Self-Hosted Site Example: Theme Twenty Twenty-Three - Editor

Screen.Capture.on.2023-04-05.at.14-54-13.mp4

Self-Hosted Site Example: Theme Twenty Twenty-Three - Live Site
Markup on 2023-04-05 at 14:54:37

📌 ACTIONS

  • Assigned to Cylon
  • CC: @jeherve is this something Jetpack folks can/should help with?

@cuemarie cuemarie changed the title Block editor: Justify text not working on Atomic. Inline Justify text not reflected in editor Apr 5, 2023
@cuemarie cuemarie added Jetpack [Platform] Simple [Platform] Atomic Triaged To be used when issues have been triaged. User Report and removed Atomic labels Apr 5, 2023
@github-actions github-actions bot added the [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts label Apr 5, 2023
@danielbachhuber
Copy link
Contributor

@cuemarie FYI - @sejas is going to shape a Project Thread (https://github.com/Automattic/dotcom-forge/issues/1913) to 1) add the feature to Gutenberg (WordPress/gutenberg#48202), and then 2) remove the feature from Jetpack (#73455).

Unfortunately, "fixing" the problem is going to take a little effort.

@cuemarie
Copy link

cuemarie commented Apr 5, 2023

Ah, thanks for the insight, @danielbachhuber !

@cuemarie cuemarie added the [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. label Apr 5, 2023
@sejas
Copy link
Member

sejas commented Jul 28, 2023

I'm not able to reproduce the issue in any case. Can someone else try to reproduce it?
Here are some recordings:

Simple - Theme Livro - Working as expected on calypso and wp-admin

Simple.site.-.Theme.Livro.mp4

Atomic - Theme Zoologist - Working as expected on calypso and wp-admin

atomic-zoologist.mp4

Atomic - Theme Jackson - Working as expected on calypso and wp-admin

atomic-jackson.mp4

Self-hosted - Theme Twenty Twenty-Three - Working as expected on calypso and wp-admin

self-hosted.-.twenty.twenty.three.mp4

@cuemarie
Copy link

Thanks @sejas - It's working for me as well across all test sites. I'll go ahead and close!

📌 ACTIONS

  • Closed as resolved

@cuemarie cuemarie added the [Closed] Resolved Issue is resolved. Use for issues that can be closed but did not have an explicit fix with a PR. label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Resolved Issue is resolved. Use for issues that can be closed but did not have an explicit fix with a PR. [Feature] Post/Page Editor The editor for editing posts and pages. [Interaction #] > 10 (Automated) interaction count label for better visibility. Please don't add these manualliy. Jetpack [Platform] Atomic [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug
Projects
None yet
Development

No branches or pull requests