Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Top padding for preventOverflow not respected in macOS Safari & iOS #422

Description

@goleary

I have a popper controlled tooltip and I'm trying to create add top padding (50px in this example) to the overflow prevention.

Here you can see even though I've turned on the altAxis overflow prevention.
image

this is the config I'm using

  const { styles, attributes } = usePopper(range, popperElement, {
    placement: 'top',
    modifiers: [
      {
        name: 'preventOverflow',
        options: {
          // TODO: figure out why top padding isn't being respected
          altAxis: true,
          padding: {
            top: 50,
            left: 8,
            right: 8,
            bottom: 8,
          },
        },
      },
    ],
  });

Reproduction demo

https://stackblitz.com/edit/react-popper-overflow?file=Tooltip.tsx

What is the expected behavior?

I'd like the tooltip to respect the top padding as specified in options.

What went wrong?

Top padding not respected.

I know the option is working because the "main" axis padding is respected.

Packages versions

  • Popper.js: 2.9.2
  • react-popper: 2.2.5

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions