Skip to content

Stop propagating to DOM elements the focusOnMount prop from NavigableToolbar components#11804

Merged
mmtr merged 4 commits intomasterfrom
fix/navigable-toolbar-focusonmount
Nov 15, 2018
Merged

Stop propagating to DOM elements the focusOnMount prop from NavigableToolbar components#11804
mmtr merged 4 commits intomasterfrom
fix/navigable-toolbar-focusonmount

Conversation

@mmtr
Copy link
Copy Markdown
Contributor

@mmtr mmtr commented Nov 13, 2018

Description

This PR removes the focusOnMount from the props transferred to NavigableMenu when rendering a NavigableToolbar component.

Fixes #11769.

How has this been tested?

Locally by checking in the React devtools that the focusOnMount prop is not passed down to the children.

Screenshots

Before
screen shot 2018-11-12 at 17 43 24

After
screen shot 2018-11-12 at 17 46 43

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@mmtr mmtr added [Type] Bug An existing feature does not function as intended [Package] Editor /packages/editor labels Nov 13, 2018
@mmtr mmtr self-assigned this Nov 13, 2018
@mmtr mmtr requested review from aduth and youknowriad November 13, 2018 09:48
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thank you for catching and fixing this bug.
I checked on React dev tools that the prop is not passed down.
I do not see the warning in the console; I'm trying to check why it does not appear in my environment.

@mmtr
Copy link
Copy Markdown
Contributor Author

mmtr commented Nov 13, 2018

@jorgefilipecosta yeah, I don't see the warning when running locally Gutenberg. I think that the build process is suppressing the warning messages.

I can see it when using the package in another project like Calypso (Automattic/wp-calypso#28427 (comment)).

@mmtr mmtr merged commit 0604cd0 into master Nov 15, 2018
@mmtr mmtr deleted the fix/navigable-toolbar-focusonmount branch November 15, 2018 11:07
@youknowriad youknowriad added this to the 4.4 milestone Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor: invalid focusOnMount prop

3 participants