GedMarc / bootstrap4-dialog

bootstrap4 compatible modal dialog based on nakupanda.github.io/bootstrap3-dialog
https://nakupanda.github.io/bootstrap3-dialog/
65 stars 31 forks source link

Use the native Bootstrap feature to close backdrop on click #19

Closed michael-maltsev closed 4 years ago

michael-maltsev commented 4 years ago

The comment explains why it was necessary:

Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel.

Looks like the original author wanted to provide a way to change this setting dynamically. The downside of the custom implementation is that it doesn't work as well - if the user clicks inside the dialog (e.g. to select text), and releases the mouse outside, the dialog closes, which can be quite inconvenient. The native Bootstrap doesn't have this limitation. And I don't think controlling this option dynamically is very useful anyway.

A gif demonstrating the issue:

AVnaYJ3jFV

P.S. I wasn't able to minify the code, since Gulp 4 (which is installed via npm install) isn't supported, and Gulp 3 doesn't support recent npm versions.

GedMarc commented 4 years ago

Just gonna run it through a couple of tests then will pull it in :)