Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 updates shakes UI when a Bootstrap dialog opens or closes. How can I get rid of this behavior?

I have observed when bootstrap dialog opens, body tag of html gets following css.

<body class="modal-open" style="padding-right: 17px;">

I think this is causing the UI to shake. How can I get rid of this weird behavior. I have created fiddle. But this issue is not produced there. But in my local environment I am able to reproduce this. JSFiddle

like image 846
Manjay_TBAG Avatar asked Apr 13 '15 05:04

Manjay_TBAG


People also ask

How do I turn off modal dialog?

Answer: Use the modal('hide') Method You can simply use the modal('hide') method to hide or close the modal window in Bootstrap using jQuery. Other related Bootstrap's modal methods are modal('show') and modal('toggle') .

How do I stop modal popups automatically?

Inside the Open event handler of the jQuery UI Dialog Modal Popup box, using the JavaScript setTimeout function and the jQuery UI Dialog “close” command, the jQuery UI Dialog Modal Popup box is set to automatically close after delay of 5 seconds (some seconds). This dialog will automatically close in 5 seconds.

How do I dispose of Bootstrap modals?

Live Demo: Dispose Bootstrap Modal Using jQuery. First launch modal, then close it, then press "Dispose Modal" button to remove the modal data stored on the DOM element. Press Ctrl+Shift+J (Windows / Linux) or Cmd+Opt+J (Mac) to open the browser console panel.

How do I stop Bootstrap popups?

There are few ways to close modal in Bootstrap: click on a backdrop, close icon, or close button. You can also use JavaScript hide method. Click the button to launch the modal. Then click on the backdrop, close icon or close button to close the modal.


1 Answers

Just add this to your css:

.modal-open {
  padding-right: 0px !important;
}
like image 185
AndrewL64 Avatar answered Oct 12 '22 20:10

AndrewL64