Whenever I launch a bootstrap modal, I notice unexpected side padding or margin appearing on certain HTML elements.
For instance:
Before displaying the modal:
<div id="fixedMenu" class="d-none container-fluid menu sticky-top px-0" style="">
...
</div>
After the modal is shown:
<div id="fixedMenu" class="d-none container-fluid menu sticky-top px-0" style="padding-right: 15px; margin-right: -15px;">
...
</div>
padding-right: 15px; margin-right: -15px;
is added to the style property.
Another example:
Prior to displaying the modal:
<form class="sticky-top sticky-top-filters" id="filters" style="">
...
</form>
After the modal is displayed:
<form class="sticky-top sticky-top-filters" id="filters" style="padding-right: 39px; margin-right: -15px;">
...
</form>
padding-right: 39px; margin-right: -15px;
is included in the style property.
What could be the reason for this behavior when using a bootstrap modal?
UPDATE
I have discovered that the sticky-top class is the cause of the issue; removing it resolves the problem. However, I require this class for functionality.