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

Use lodash includes in the navigable menu. #5528

Merged
merged 3 commits into from
Mar 9, 2018

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Mar 9, 2018

This PR tries to fix a bug where the NavigableMenu component used the native includes which is not supported in IE11, causing the arrows navigation to break.

Fixes #5527

@afercia afercia requested a review from aduth March 9, 2018 11:39
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

While we're here, maybe update these as well?

const blockTypeIsDisabled = Array.isArray( enabledBlockTypes ) && ! enabledBlockTypes.includes( blockType.name );

const blockTypeIsDisabled = Array.isArray( enabledBlockTypes ) && ! enabledBlockTypes.includes( 'core/block' );

From #4497 (cc @noisysocks)

@afercia
Copy link
Contributor Author

afercia commented Mar 9, 2018

@aduth done (please double check, not really my area of expertise)

@aduth
Copy link
Member

aduth commented Mar 9, 2018

Looks good. Thanks.

@jorgefilipecosta jorgefilipecosta force-pushed the fix/navigable-menu-arrow-navigation-ie11 branch from 3f76567 to 21c956f Compare March 9, 2018 17:51
@jorgefilipecosta
Copy link
Member

jorgefilipecosta commented Mar 9, 2018

I added a commit that does the same refactor in a very recent change in a selector that happened after this PR was created. Thank you for the PR, array includes is something I will try to keep an eye.

@jorgefilipecosta jorgefilipecosta merged commit 0ec3408 into master Mar 9, 2018
@jorgefilipecosta jorgefilipecosta deleted the fix/navigable-menu-arrow-navigation-ie11 branch March 9, 2018 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IE11: Inserter tabs arrows navigation doesn't work (JS error)
3 participants