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

CTRL + A does not select anything if editor only has (or had) only one Classic block #12341

Closed
mrwweb opened this issue Nov 27, 2018 · 9 comments
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended

Comments

@mrwweb
Copy link

mrwweb commented Nov 27, 2018

Describe the bug
Hitting CTRL + A makes no selection if there is only one block. This is particularly an issue using the "hybrid" workflow of Gutenberg + a single Classic block.

To Reproduce

  1. Insert a classic block or paragraph block
  2. Put at least a few characters in it.
  3. Press CTRL + A
  4. Nothing happens

Expected behavior
The entire paragraph/classic/other block is selected.

Desktop (please complete the following information):
Win 10, Firefox 63.0.3, WordPress 5.0-RC1-43944, no plugins, Twenty Nineteen

@mrwweb mrwweb changed the title CTRL + A does not select anything if only one block CTRL + A does not select anything if editor only has one block Nov 27, 2018
@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 27, 2018
@designsimply
Copy link
Member

I tested with WordPress 5.0-RC1-43944 and Firefox 63.0.3 on macOS 10.13.6 and found that pressing Cmd + A from within a single classic block with a few words in it resulted in the contents of the block being selected as expected and if I unselect the block by clicking on the white space in the page then I needed to press Cmd + A twice to select the content.

12341
Seen at https://madefortesting.com/wp-admin/post.php?post=722&action=edit running WordPress 5.0-RC1-43944 tested with Firefox 63.0.3 on macOS 10.13.6.

I also tested using WordPress 4.9.8 and Gutenberg 4.5.1 using Firefox 63.0.3 on macOS 10.13.6 and found the same result with the plugin.

Testing note: leaving the Needs Testing label and noting it would be good to have another tester confirm whether or not this happens for them on Windows (since the original report was for Windows and my first pass of testing was with macOS).

@mrwweb
Copy link
Author

mrwweb commented Nov 27, 2018

Thanks for testing this, @designsimply. I did some further testing and now realize this bug is more specific than I thought, though you'll see why I ended up thinking it was broader.

This seems to only happen when the Classic block is the first and only block. (Even an empty second block will make CTRL + A "work".) HOWEVER, once the classic block has been the first and only block (i.e. it was there and then deleted), then the bug will also happen if a paragraph block is now the first and only block.

I've updated the title accordingly.

(What do you use for GIFs that shows the keystrokes?)

@mrwweb mrwweb changed the title CTRL + A does not select anything if editor only has one block CTRL + A does not select anything if editor only has (or had) only one Classic block Nov 27, 2018
@designsimply
Copy link
Member

What do you use for GIFs that shows the keystrokes?

ScreenFlow and I ❤️ it!

@designsimply
Copy link
Member

This seems to only happen when the Classic block is the first and only block. (Even an empty second block will make CTRL + A "work".)

By empty block do you mean the default block—as in the one with the (+) inserter to the left? I tried but I couldn't figure out how to get a post into a state where there was a classic block and no default block. I think it's possible this could happen if you have a plugin installed that changes the default block to something other than paragraph but I am not sure. In any case!, how do I get a post into a state where there's a classic block and no empty/default block? I tried creating a post with the Gutenberg plugin deactivated then re-activating Gutenberg, but the default/empty block is always there in my testing. Note: I'm using Firefox 63.0.3 on macOS 10.13.6 so maybe I should try with Windows (but I can't imagine that would make a difference for this case!)?

@mrwweb
Copy link
Author

mrwweb commented Nov 27, 2018

There would seem to be at least three ways:

  1. Insert the block with the "/" inserter
  2. Insert the block, delete the empty block below it
  3. Make a template with only that block (I hadn't thought about that until you suggested it, but it's a good idea!)

Ways 1 and 2:

only-classic

ScreenFlow and I ❤️ it!

Mac only 😢

@designsimply
Copy link
Member

designsimply commented Nov 27, 2018

I tested with Firefox 63 on Windows 10 and found that Ctrl+A works for me on a first pass but does not work subsequently.

12341
Seen at https://tan-otter.jurassic.ninja/wp-admin/post.php?post=127&action=edit tested with Firefox 63 on Wondows 10 (VM).

Related: #8180

Aside: okay, after seeing the your explanation, I think we're just thinking of the default/empty block slightly differently (screenshot) and I think my testing was good.

Mac only 😢

Gah! I didn't know…

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... and removed Needs Testing Needs further testing to be confirmed. labels Nov 27, 2018
@mrwweb
Copy link
Author

mrwweb commented Nov 27, 2018

I think we're just thinking of the default/empty block slightly

I think you're right. I think of the "default/empty" block as the paragraph with placeholder text to the left of what you're pointing at.

@skorasaurus
Copy link
Member

still reproducible in Gutenberg 9.8.0

@ellatrix
Copy link
Member

ellatrix commented Aug 9, 2023

The Classic Block is now is a modal and much more stable than before (closer to the old editor, which was also iframed). Closing this because these are now separate editing experiences.

@ellatrix ellatrix closed this as completed Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants