Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Cannot Edit Text Inside Paragraph Block #54201

Open donalirl opened 3 years ago

donalirl commented 3 years ago

There are sporadic issues with editing text in a paragraph block. When editing a page or post, all of a sudden new text cannot be typed inside of a paragraph block. The paragraph is selected with a blue border around it, but typing has no effect. Videos of this behavior below. Reloading the editor makes the issue go away, but it can reoccur.

Steps to reproduce the behavior

I have not been able to reproduce this issue yet, but several users have reported it to me and I have experienced it myself several times. I haven't identified any helpful patterns to this but I wanted to report this somewhere and hopefully get some insight from others who have come across this issue too.

Browser

Chrome 91

Does this happen on simple or atomic sites or both?

All simple sites, but haven't ruled out atomic either.

Screenshot & Videos

https://user-images.githubusercontent.com/30727666/124084735-a26c0280-da92-11eb-9668-20e23982aad8.mov

https://user-images.githubusercontent.com/30727666/124085002-e9f28e80-da92-11eb-9c48-f10099dee115.mov

screenshot-2021-06-28-201333

Context

4102070-zen #4102150-zen #26017803-hc

p1624927104440800-slack-C03TY6J1A

KirkwallDay commented 3 years ago

Another instance here: 4106450-zen

They say this started about 3 - 4 weeks ago, and the problem is also very intermittent.

Clearing cache has no effect on the issue.

goblinartificer commented 3 years ago

In 30429364-hc the user mentions that this started when the custom size (px/em/rem) boxes appeared for what they believe is setting font size, and that it didn't happen before then, just in case that is helpful.

msilbers commented 3 years ago

This has happened to me as well. I had no related errors in console, though I did have some errors in the browser console from Giphy.

Chrome Version 91.0.4472.114

kriskarkoski commented 3 years ago

User in 4102070-zen has provided a video of the issue.

donalirl commented 3 years ago

Another report in #30467213-hc

donalirl commented 3 years ago

I encountered this issue myself and captured a short video below. In the video, I am clicking on the paragraph blocks with my mouse, and pressing keys on my keyboard but the typing does not appear.

The steps to reproduce are not clear. I was working on the page for maybe 40 minutes. I then stepped away for about 5 minutes, leaving the page open. When I returned, the issue appeared:

https://user-images.githubusercontent.com/30727666/125546921-101f5285-5b5c-4be8-a3b7-6183f6dcac28.mp4

You'll notice I have the Grammarly extension installed. I disabled it and the issue persisted. The original case I reported above does not use Grammarly, so I think we can rule that out.

KokkieH commented 3 years ago

Several more reports in https://wordpress.com/forums/topic/blocks-freeze/

Reports in that thread specifically mention it happening when text is selected across multiple blocks.

Happens across browsers, but doesn't seem to happen in Brave.

donalirl commented 3 years ago

Another report in Safari 12.1 on Mac OS X 10.12.6. No browser extensions installed.

davoraltman commented 3 years ago

Another report in 31554406-hc

HubhavadGita commented 3 years ago

I have a temporary workaround for this issue:

  1. in your block editor select: "edit as HTML"; and then
  2. change it back to "edit visually". then your block will be accessible again (at least for a while).
thekingsprojects commented 3 years ago

Another report in 31598228-hc , Business (AT) user with Chrome. They aren't sure what caused it; just started happening today. They're also seeing an error with their Yoast Premium plugin on the page they're trying to edit ("unfortunately our Morphology feature is not working"), but I'm not sure that's related.

The edit as HTML workaround did work for them, though.

cuemarie commented 3 years ago

Another report here, Simple site: 4382306-zen

I've shared the edit with HTML (and refreshing the page editor itself) workarounds with them, and asked if they're able to recreate the issue intentionally, and if so to send us those steps.

HubhavadGita commented 3 years ago

I actually figured out why this issue happens:

Whenever I do set the cursor on one point within a text, and then click on a previous or later point in the text, whilst pressing the shift button (in order to mark that portion), then any block which does contain text on my macbook always freezes.

My previous workaround is not the only one - the principle behind workarounds is to get out of that block and somehow reload it, by either clicking on html view and then getting back to normal view, or by reloading that entire page, or by doing any measure which does somehow reload this block (likee by moving it around or many other ways).

I hope this helps.

HubhavadGita commented 2 years ago

The issue was solved for a few days but unfortunately started again (I assume due to further changes by wordpress.

jackiejade commented 2 years ago

Above user also reported in chat 32390441-hc

katiebethbrown commented 2 years ago

Another report in 32070177-hc.

KokkieH commented 2 years ago

Another in https://wordpress.com/forums/topic/block-editor-not-working-2/?view=all

JoshuaGoode commented 2 years ago

4421243-zen

If the user selects multiple blocks while highlighting some text, they then get stuck in a multi-block selection mode and can't edit again unless they refresh.

Gutenberg: v11.7.1 Editing Toolkit: 3.17927 WP AMP: 2.0.5 CoBlocks: 2.10.1

Browser: Chrome 95 on macOS

Simulated Example

This video attempts to demonstrate the end result where they get stuck and have to exit the editor or refresh.

https://user-images.githubusercontent.com/4887830/139746739-37ae6f60-2216-40cd-b433-150b490068c8.mp4

Addition notes

I cannot reproduce at all but those that can seem to be able to reproduce it consistently.

Can we produce this on Atomic and self-hosted?

If we can reproduce on self-hosted or a local environment, we'll want to make sure this is reported to core.

erricgunawan commented 2 years ago

Just came across this so I'd also like to add that this also happens to me often.

I have no idea to reproduce and it's just that sometimes, it happens. What has been described in the many above reports, I might have actually done those too.

My workaround is usually selecting multiple blocks, then pressing Escape.

Somehow it just worked. Somehow it made the "Select" mode is chosen (because I pressed Escape?).

Sometimes, when I click the "Edit" mode, then finally it resolves.

image

But if not, I'd just repeat the above steps multiple times until it works. I didn't really want to refresh the Editor since sometimes, there are still some unsaved changes and I wouldn't want to lose them.

Also, since pressing Escape (from the screenshot above) means it will turn into "Select" mode, I tried pressing Enter in hoping it would turn into "Edit" mode. Most of the times, it would end with doubling the existing text/content on whichever block the cursor is currently at.

I wish I could have a way to reproduce, so I can share screenshots or a screencast.

But most of the time, it happened when I wrote something with personal/sensitive information. So I can't really share that.

sophiegyo commented 2 years ago

Report in 32664554-hc.

I shared the three workarounds mentioned above (edit as HTML/edit visually, switch between 'edit' and 'select' mode, and move blocks around). So far the user said that they already tried edit as HTML/edit visually, and switching between 'edit' and 'select mode', but neither of these worked for them.

User browser: Chrome 95.0 User OS: Windows 10

metabreakr commented 2 years ago

I encountered this issue myself when commenting in P2. While I have the ProWritingAid extension installed, I have since not been able to reproduce. Hitting ESC on my keyboard cancelled my comment reply and deleted its content 🥲

VariantT505 commented 2 years ago

Happens to me on a daily basis. I write movie reviews while I watch them and my editor is open for a long time on the same article. After some minutes, all my paragraphs blocks freeze. I have to delete them and ctrl+Z to undo and then they are usable again.

Tried on a MacBook Pro mid-2010 with an old version of Safari on Mac OS High Sierra (and I thought at first that my browser was just too old). But I received my new MacBook Pro M1 yesterday with Mac OS Monterey (12.2) and the latest Safari (15.3), and it happened again.