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

Fix editor break on Unified toolbar #11996

Merged
merged 1 commit into from
Nov 19, 2018
Merged

Conversation

oandregal
Copy link
Member

How to reproduce:

  • Open a post
  • Change to Unified toolbar mode
  • Go to the block settings menu
  • Select the "Duplicate block" option
  • Hit Ctrl+Z (Alternative: click Undo button and then open the block settings menu).

The editor crashes.

peek 2018-11-16 20-19

some interactions may cause no block being selected.
@oandregal oandregal self-assigned this Nov 16, 2018
@oandregal oandregal added [Type] Bug An existing feature does not function as intended [Priority] High Used to indicate top priority items that need quick attention labels Nov 16, 2018
@oandregal oandregal added this to the 4.5 milestone Nov 16, 2018
@oandregal
Copy link
Member Author

oandregal commented Nov 16, 2018

This fix prevents the editor from breaking but notice how there is yet something wrong with the block settings menu: the hamburger menu shouldn't be shown when no block is selected.

peek 2018-11-16 20-17

Created #12002 to track block selection being lost.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Maybe just a small test to avoid the regression.

@gziolo gziolo merged commit 3726c56 into master Nov 19, 2018
@gziolo gziolo deleted the fix/editor-break-on-unified-toolbar branch November 19, 2018 10:23
@gziolo
Copy link
Member

gziolo commented Nov 19, 2018

Let's open a follow-up issue where we will add e2e tests for this functionality. I don't think we have this extensibility area covered at all. For reference you can check how I filed an issue for Format API and marked as Good First Issue: #11583. E2e tests are a great way to start for new contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants