ifad / data-confirm-modal

Makes Rails' link_to confirm: 'foo' build a Bootstrap Modal instead of calling the browser's confirm() API.
MIT License
271 stars 115 forks source link

Move modal class #88

Closed timokae closed 3 years ago

timokae commented 3 years ago

When using the modalClass property the class gets inserted at the wrong place, resulting in not resizing and not centering the modal on the page. Instead of placing the class in the modal div it must be used in the modal-dialog div.

Old behaviour bs4_old

New behaviour bs4_new

I tested the new version for both, Bootstrap 3 and 4 and created a jsFiddle (with BS4).

tagliala commented 3 years ago

Thanks, got it. It is needed to use the Optional Sizes

I would go for a new setting, modalDialogClass.

We may use modalClass for other purposes (attach custom js events / custom style) and that would be a breaking change

@vjt thoughts?

tagliala commented 3 years ago

Just noticed that this is already addressed by #75

Does the change in #75 work for your use case?

timokae commented 3 years ago

Good catch. Yes, this would also work for my use case. No need for my changes then.

tagliala commented 3 years ago

Superseded by #91