Skip to content

Conversation

@beekermememe
Copy link

Addresses #[854] - Issue on Modal Lock when modal contains web component that contains an iframe

Changes proposed:
Adding a check to see if the element is a prototype of Element before checking computed style

The issue is that as the react-modal is cycling through the elements to determine whether they are tabbable, when it comes to cycling through the modal, it goes from inside to out. As it moves from

<iframe id="wiz"> up to the parent node to
then up the the next parent node

I was able to confirm that the issue is that when it hits the , this is being returned as a ShadowRoot object, which has no parent and is not supported by the window.getComputedStyle (since it can never have style)

Acceptance Checklist:

  • [x ] The commit message follows the guidelines in CONTRIBUTING.md.
  • [na ] Documentation (README.md) and examples have been updated as needed.
  • If this is a code change, a spec testing the functionality has been added.
  • [na ] If the commit message has [changed] or [removed], there is an upgrade path above.

Copy link
Collaborator

@diasbruno diasbruno left a comment

Choose a reason for hiding this comment

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

See comment on patch...

@beekermememe beekermememe marked this pull request as ready for review May 28, 2021 14:11
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 84.697% when pulling 42b029d on beekermememe:handle-non-element-in-tabbable-check into 827796d on reactjs:master.

@diasbruno diasbruno merged commit fc62ab1 into reactjs:master Jun 1, 2021
@diasbruno
Copy link
Collaborator

@beekermememe Thanks!

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.

4 participants