Bootstrap Modals keep adding padding-right to body after closed

后端 未结 30 1950
南方客
南方客 2020-12-12 12:36

I am using bootstrap and Parse framework to build a small webapp. But those Bootstrap modals keep adding padding-right to body after closed. How to solve this?

I tri

30条回答
  •  一生所求
    2020-12-12 13:16

    I had that same problem using modals and ajax. It was because the JS file was referenced twice, both in the first page and in the page called by ajax, so when modal was closed, it called the JS event twice that, by default, adds a padding-right of 17px.

提交回复
热议问题