javascript - Fix page shift when opening and closing uib-modal of angular ui bootstrap -
there page shift when opening , closing uib-modal. check https://angular-ui.github.io/bootstrap/#/modal . notice scrollbar disappearance , appearance.
this question asked here (opening angularjs modal causes page shift if scrollbar exists) doesn't has working soultion. solution given set overflow-y body creates vertical scrolling if scrolling not needed.
body{ overflow-y: scroll !important; } also visited following links couldn't implement uib-modal. there fix solve issue? in advance.
shifting may coming because when modal opens add padding body. due bugs don't know padding remains body when modal closed , because of page shifts.
when modal being closed on button click can try -
$("#modalid").modal('hide'); $('.modal-backdrop').remove(); $('body').removeclass('modal-open'); $('body').css('padding-right', ''); it worked in case.
Comments
Post a Comment