I am facing an issue with popover display using Bootstrap 4.6
Here is a basic example:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6208131707101b22514c574c53">[email protected]</a>/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b9dbd6d6cdcacdcbd8c9f98d978f9788">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="84e6ebebf0f7f0f6e5f4c4b0aab2aab5">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF" crossorigin="anonymous"></script>
</head>
<body style="background-color: cadetblue; height:1000px">
<header style="height: 100px">
</header>
<section style="overflow-y: auto; height: 500px; background-color: cornsilk;">
<div style="height: 1000px" > </div>
<div id="test">
<button type="button"
data-placement="top"
data-toggle="popover"
title="Blah"
data-content="Bleh Bleh">Blih</button>
</div>
<script>
$("button").popover({})
</script>
<div style="height: 1000px" > </div>
</section>
</body>
</html>
the popover is correctly shown when the button is visible inside the scroll:
However, when I scroll and the button transitions through the "cadetblue" zones, the popover does not scroll along but instead gets stuck at the top or bottom boundary:
Popover stays in the "upper limit" when scrolling down the section
Popover stays in the "lower limit" when scrolling up the section
I have tried adjusting the container
, boundary
, and fallbackPlacement
options based on various solutions suggested for similar issues, but so far, nothing has worked. It seems that achieving proper popover visualization in Bootstrap 4.6 can be challenging, but considering the simplicity of my problem, I believe I must be missing something essential.