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

Conversation

Projects
None yet
3 participants
@nosolosw
Member

nosolosw commented Nov 16, 2018

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

Fix editor break on Unified toolbar
some interactions may cause no block being selected.

@nosolosw nosolosw self-assigned this Nov 16, 2018

@nosolosw nosolosw added this to the 4.5 milestone Nov 16, 2018

@nosolosw

This comment has been minimized.

Member

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

@youknowriad

LGTM 👍

Maybe just a small test to avoid the regression.

@gziolo gziolo merged commit 3726c56 into master Nov 19, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the fix/editor-break-on-unified-toolbar branch Nov 19, 2018

@gziolo

This comment has been minimized.

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.

youknowriad added a commit that referenced this pull request Nov 19, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Fix editor break on Unified toolbar (WordPress#11996)
some interactions may cause no block being selected.

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment