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
Table block causes errors when no table elements are selected #1751
Comments
Seems to be a Chrome specific bug (the table is automatically selected on Firefox) which I guess is why I never saw it in development. |
This looks like a TinyMCE bug as it should be focusing the editor on load but because the body element is a table it's not working. I will file a bug on Jira for TinyMCE and work around the bug by selecting the first table cell on init. |
After #1755 this is a bit better; however, automatically selecting the first cell is not enough. It's not difficult to select a block without focusing any of its elements: click the space under the block mover arrows. Then this error appears again. |
Also, there is a regression regression with #1755: the cell is getting focused even when the block is not focused. On the Gutenberg Demo page, after the page loads the cursor gets put onto the table halfway down the page: |
@EphoxJames can we get an update on this? #1798 is at least a partial fix but it really needs to be fixed in the table plugin instead. |
I've added a check before calling execCommand to see if the table is selected and apply a default selection of the first cell if it is not. |
cc @EphoxJames
The text was updated successfully, but these errors were encountered: