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

Editor: invalid focusOnMount prop #11769

Closed
mmtr opened this issue Nov 12, 2018 · 1 comment · Fixed by #11804
Closed

Editor: invalid focusOnMount prop #11769

mmtr opened this issue Nov 12, 2018 · 1 comment · Fixed by #11804
Assignees
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Package] Editor /packages/editor

Comments

@mmtr
Copy link
Contributor

mmtr commented Nov 12, 2018

Describe the bug
When using the latest package version of the @wordpress/editor npm package the following warning can be observed in the browser console:

Warning: React does not recognize the `focusOnMount` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `focusonmount` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

It looks like this was introduced in #11401.

To Reproduce
Steps to reproduce the behavior:

  • Install latest version of @wordpress/editor package
  • Try to build your standalone app with this and render the BlockList component.
@designsimply designsimply added [Package] Editor /packages/editor Needs Technical Feedback Needs testing from a developer perspective. labels Nov 12, 2018
@mmtr mmtr self-assigned this Nov 13, 2018
@mmtr
Copy link
Contributor Author

mmtr commented Nov 13, 2018

Another way of checking the issue is by running the project locally and opening the editor. After adding a paragraph block and clicking on it for viewing the contextual toolbar, we can inspect the BlockContextualToolbar component in the React devtools.

The focusOnMount prop is propagated down to a div element:

screen shot 2018-11-12 at 17 43 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Package] Editor /packages/editor
Projects
None yet
2 participants