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

Components wrapped in <Popover> do not respect width: 100% #2931

Closed
mitchbeard opened this issue Sep 12, 2018 · 2 comments · Fixed by #3635
Closed

Components wrapped in <Popover> do not respect width: 100% #2931

mitchbeard opened this issue Sep 12, 2018 · 2 comments · Fixed by #3635

Comments

@mitchbeard
Copy link

mitchbeard commented Sep 12, 2018

Environment

  • Package version(s): "@blueprintjs/core": "^3.2.0"
  • Browser and OS versions: Chrome or JXBrowser

Steps to reproduce

  1. Create a container div with width 100% and a child div with width: 100%
  2. See the child fill the container properly
  3. Wrap the child in a <Popover> (as the click target, not the popover content)
  4. See the child no longer fill the horizontal space.

Actual behavior

See above

Expected behavior

The child continues to fill the parent width even when wrapped in a as the target

Possible solution

Fix the popover spans to prevent this. In my code I'm using

    span.bp3-popover-wrapper, span.bp3-popover-target {
        width: 100%;
    }

in a bunch of places to fix :(

@badams
Copy link
Contributor

badams commented Sep 12, 2018

@mitchbeard I think switching to div instead of span for your target element will fix this, try targetTagName="div" on the popover

@gjavitt
Copy link
Contributor

gjavitt commented Jun 17, 2019

i just ran into this issue as well - perhaps worth noting in the docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants