Skip to content

Use lodash includes in the navigable menu.#5528

Merged
jorgefilipecosta merged 3 commits intomasterfrom
fix/navigable-menu-arrow-navigation-ie11
Mar 9, 2018
Merged

Use lodash includes in the navigable menu.#5528
jorgefilipecosta merged 3 commits intomasterfrom
fix/navigable-menu-arrow-navigation-ie11

Conversation

@afercia
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

afercia commented Mar 9, 2018

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

@aduth
Copy link
Copy Markdown
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
Copy Markdown
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