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

Table block causes errors when no table elements are selected #1751

Closed
nylen opened this issue Jul 5, 2017 · 6 comments
Closed

Table block causes errors when no table elements are selected #1751

nylen opened this issue Jul 5, 2017 · 6 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects

Comments

@nylen
Copy link
Member

nylen commented Jul 5, 2017

  • Add a new table block
  • Do not focus any elements (the block is selected, but no elements within it are focused)
  • Click the table dropdown menu and click an operation such as "Insert Row Before"
  • Observe console errors, and that nothing happens:

2017-07-05t21 24 00 0200

cc @EphoxJames

@nylen nylen added [Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended labels Jul 5, 2017
@BoardJames BoardJames self-assigned this Jul 6, 2017
@BoardJames
Copy link

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.

@BoardJames
Copy link

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.

@nylen
Copy link
Member Author

nylen commented Jul 6, 2017

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.

@westonruter
Copy link
Member

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:

image

@nylen
Copy link
Member Author

nylen commented Aug 1, 2017

@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.

@BoardJames
Copy link

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.

@BoardJames BoardJames moved this from To Do to In Progress in Ephox Team Aug 3, 2017
@anna-harrison anna-harrison moved this from In Progress to Done in Ephox Team Aug 7, 2017
@anna-harrison anna-harrison moved this from Done to Logged in JIRA in Ephox Team Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
No open projects
Ephox Team
Logged in JIRA
Development

No branches or pull requests

3 participants