It's common knowledge that there is a bug in bootstrap modals on certain devices, causing the page behind the modal to scroll instead of the modal itself (http://getbootstrap.com/getting-started/#support-fixed-position-keyboards)
An easy fix for this bug is to add a CSS rule .modal-open { position: fixed; }
.
However, this quick fix leads to another issue - when a modal is opened, the page automatically scrolls to the top. This can be solved using JavaScript, like so:
But here's the dilemma: I am utilizing the angular-bootstrap package, which replaces bootstrap jquery events with promises. Due to this, I'm unsure how to set up global handlers for all modals on show/hide events. With numerous modals in my code, it's not ideal to define these handlers individually for each modal call.
Does anyone have suggestions on overcoming the scroll to the top problem within my current setup?