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

Popover: don't render fallback anchor if anchorRef is defined #19308

Merged
merged 2 commits into from
Dec 23, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Dec 23, 2019

Description

Currently a span element is always rendered for a Popover to use as a fallback if there is no anchorRef or anchorRect. It's not needed to render this element if either of these is defined.

How has this been tested?

Popover should render as before. I also tested that the scroll lock still works for the inserter on small screens.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@ellatrix
Copy link
Member Author

I also tested with Storybook that the fallback still works.

@ellatrix ellatrix merged commit a94c854 into master Dec 23, 2019
@ellatrix ellatrix deleted the fix/popover-fallback-anchor branch December 23, 2019 16:45
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
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.

2 participants