You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this issue only seems to occur in angular 1.2.* builds and manifests itself as follows.
If the page is longer than the viewport and I click the button that opens the modal at the bottom of the page, on modal dialog open, the page scrolls back to the top of the page.
This only occurs if I use ng-include in the modal-body of a bootstrap modal.
I have also tried upgrading bootstraps css from 3.1.1 to 3.3.4. This makes no difference
The plunkers above are pretty basic and just there to prove the problem exists. Let me explain my use case for more context. I have an angular template that houses a set of search fields(textfields, dropdowns etc that are used in a number of pages in our application. I would also like to re-use this template in a modal dialog. To do this I include the template in the modal-body of the modal using ng-include
I would upgrade 1.3.x or above, but we currently support ie8 :-(
Any feedback welcome
The text was updated successfully, but these errors were encountered:
brianmyler
changed the title
angular 1.* ui-bootstrap modal opening page scrolls to top
angular 1.2.* ng-include used inside ui-bootstrap - modal opening page scrolls to top
Oct 9, 2015
Hi, this issue only seems to occur in angular 1.2.* builds and manifests itself as follows.
If the page is longer than the viewport and I click the button that opens the modal at the bottom of the page, on modal dialog open, the page scrolls back to the top of the page.
This only occurs if I use ng-include in the modal-body of a bootstrap modal.
There are 3 plunkrs below.
The first one http://plnkr.co/edit/ppH9MqmL6FCBR9PpgjYD?p=preview uses angular 1.2.29 and has a modal without an ng-include in the modal-body and works as expected(page does not scroll to top)
The second http://plnkr.co/edit/KHyMuIQQOBzJu8ZkuCS7?p=preview uses angular 1.2.29 and has a modal with an ng-include in the modal-body (page scrolls to top)
The third one http://plnkr.co/edit/HfyctrZDJNN8Of8aYOTU?p=preview uses angular 1.4.5 and has a modal with an ng-include in the modal-body (page does not scroll to top)
I have also tried upgrading bootstraps css from 3.1.1 to 3.3.4. This makes no difference
The plunkers above are pretty basic and just there to prove the problem exists. Let me explain my use case for more context. I have an angular template that houses a set of search fields(textfields, dropdowns etc that are used in a number of pages in our application. I would also like to re-use this template in a modal dialog. To do this I include the template in the modal-body of the modal using ng-include
I would upgrade 1.3.x or above, but we currently support ie8 :-(
Any feedback welcome
The text was updated successfully, but these errors were encountered: