Bootstrap Popover showing in the wrong place when scaling to / from or resizing the browser window

When I resize windows of any browser using scaling or scaling. Popover does not update the position and does not appear in the wrong place.

How to change the location / position of Bootstrap Popover after resizing the zoom / zoom window.

+2
source share
3 answers

It seems to work fine in Bootstrap 2.2.1 (if I don't understand your question correctly). Try the demo version of http://twitter.github.com/bootstrap/javascript.html#modals to see if this is really what you are looking for. I use the onresize event for a window to correctly set the size of a complex modal and its interior.

+1
source

I tried to rearrange it myself using offset().top and outerHeight() , but ran into problems. The solution for me was to simply repeat the popover show event:

  $(window).off("resize").on("resize", function() { $(".popover").each(function() { var popover = $(this); if (popover.is(":visible")) { var ctrl = $(popover.context); ctrl.popover('show'); } }); }); 
0
source

It does not work on a page with multiple popovers, since it displays all the pop-ups when the window is resized

0
source

Source: https://habr.com/ru/post/1487146/


All Articles