WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.54k stars 4.21k forks source link

Post content block should not be selectable in write mode with template rendered #67129

Open richtabor opened 6 days ago

richtabor commented 6 days ago

When viewing a page with a template rendered, the write mode tool is available.

When active, I would not expect to be able to select, and edit, the post content block. I'm not editing the template here (and saving does not reflect any of the changes, as expected, since those are not valid).

https://github.com/user-attachments/assets/5647719e-4fae-4a94-8f8d-6cc249314e78

yogeshbhutkar commented 5 days ago

Hi @richtabor, thanks for reporting the issue. I was able to reproduce the bug. Would like to fix it with a corresponding PR. Thanks!

richtabor commented 3 days ago

Note that if the post content block is selectable, the inserter tries to add the next block below it (which it can't, as we're not editing the template). Another +1 for making the post content not a selectable block unless you're editing the template perhaps.

https://github.com/user-attachments/assets/89cc9a98-3d11-4139-9e45-72d05287bf54

richtabor commented 3 days ago

One also has to be careful about how many times you command + a to select all, which the further you're nested the hardest it is to guess what count is one too many:

https://github.com/user-attachments/assets/cad58b40-ac9c-4d58-885c-69361b4d6b95