Skip to content

Allow Popper placement for tooltip and popover #26727

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

Closed
BnitoBzh opened this issue Jun 20, 2018 · 2 comments
Closed

Allow Popper placement for tooltip and popover #26727

BnitoBzh opened this issue Jun 20, 2018 · 2 comments

Comments

@BnitoBzh
Copy link

In order to align Bootstrap with popperJS behavior, is it possible to implement the same placement configuration ?
The Bootstrap list of accepted placements is : auto, top, right, bottom, left.
In PopperJS each placement (except auto) can have a variation from this list : *-start, *-end

A first work has been done but not yet validated : #23940
The idea is good but the placement names do not match, and the behavior on display either.

  • I think placement names must be the same than PopperJS.
  • For display, the existing placements are good, but their variants must be updated like PopperJS, ie tooltips and popovers must aligned with the targetted element and arrows must be placed correctly. https://popper.js.org/index.html#example4

top-start : tooltip/popover align with the left side of the targeted element, and arrow placed to the left, if the tooltip/popover is bigger than the targeted element, it may overtake to the right
top-end : tooltip/popover align with the right side of the targeted element, and arrow placed on the right, if the tooltip/popover is bigger than the targeted element, it may overtake to the left
right-start : tooltip/popover align with the top side of the targeted element, and arrow placed on the top, if the tooltip/popover is bigger than the targeted element, it may overtake on the bottom
right-end : tooltip/popover align with the bottom side of the targeted element, and arrow placed on the bottom, if the tooltip/popover is bigger than the targeted element, it may overtake on the top
bottom-start : same as top-start
bottom-end : same as top-end
left-start : same as right-start
left-end : same as right-end

PopperJS variants has the same behavior than flexbox alignements (flex-start & flex-end)

@Johann-S
Copy link
Member

Related to: #22962

Closed for consistency

@NielsHolt
Copy link

Hi
The placement name are different because the placement is different from the PopperJS way.
In https://github.com/FCOO/bootstrap-popover-extensions/issues/1 there are some images displaying the different
But it would be possible to extend it with top-start, top-end,...left-end

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

3 participants