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 appears in top left corner when activator changes at runtime #324

Closed
nerfologist opened this issue May 22, 2018 · 1 comment
Closed

Comments

@nerfologist
Copy link

nerfologist commented May 22, 2018

Issue summary

Affected version: 1.14.2

Given a Popover whose activator element changes at runtime:

  • the Popover content is rendered in the correct position (i.e. just below the activator) only at first render
  • after the activator element is replaced, it always appears in the top left corner of the rendered area

Please refer to this code sandbox for a minimal representation of the issue.

Expected behavior

The popover should always appear below the activator element.

Actual behavior

The popover is only rendered below the element the first time it is rendered; after the activator is replaced, the popover always appears in the top left corner of the window.

Steps to reproduce the problem

  1. Write a simple case of Popover having an activator element which changes at runtime
  2. Click on the activator and notice the Popover is in the correct position
  3. Trigger a runtime change which will swap the activator element
  4. Click on the new activator element and notice the Popover content is now rendered in the top left corner

Specifications

  • Polaris version: 1.14.2
  • React version: 16.3.2
  • Browser: Chrome Version 66.0.3359.181 (Official Build) (64-bit) / Firefox 60.0.1 (64-bit)
  • Device: Macbook Pro Retina (late 2013)
  • Operating System: macOS Sierra 10.12.6

⚓️ We’re not accepting pull requests at this time

🗒 This repo is for reporting issues and feature requests only

@danrosenthal
Copy link
Contributor

Thanks @nerfologist, I've logged this issue in our internal repo and we will look into it. Closing this issue in favor of the internal issue.

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

No branches or pull requests

2 participants