Answer the question
In order to leave comments, you need to log in
Popover: fix position?
Good evening.
Connected bootstrap 4. I use an informer (popover) with iframe display inside
Problem: data-placement="bottom" does not work properly - depending on the position inside the window, the popover is displayed either above or below the call button.
Those. if it does not have enough space to display at the bottom of the screen, then it opens at the top. If you scroll with an initialized popover, then as soon as there is enough space, it moves down.
Task: hard force it to be displayed at the bottom, regardless of the conditions
I initialize the popover via js:
$(elem).popover({
trigger: 'click',
type: 'button',
placement: 'bottom',
html: true,
content: '<p>Бла-бла</p>',
});
Answer the question
In order to leave comments, you need to log in
I looked at the documentation but it's not clear
$('.....').popover({
placement: 'bottom',
fallbackPlacement: [], // <--
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question