Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setCloseByBackdrop not work #30

Open
Hessuss opened this issue Sep 28, 2020 · 7 comments
Open

setCloseByBackdrop not work #30

Hessuss opened this issue Sep 28, 2020 · 7 comments

Comments

@Hessuss
Copy link

Hessuss commented Sep 28, 2020

Hi.
Cannot prevent modal close by backdrop click after modal shown.

Methods:
setCloseByBackdrop(false);
setCloseByKeyboard(false);

not works.

Method:
setClosable(false);

only remove "x" sign. Backdrop click still active.

http://jsfiddle.net/tpy5eogs/

Can you help me?

@GedMarc
Copy link
Owner

GedMarc commented Sep 28, 2020

Hi,

Previously reported + fixed, please use the latest release 👍

Thanks

@4.3.6 in URL - I've learnt however that jsDelivr needs an update.json file to auto update

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.js"></script>
<link href="https://cdn.jsdelivr.net/gh/GedMarc/[email protected]/dist/css/bootstrap-dialog.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/gh/GedMarc/[email protected]/dist/js/bootstrap-dialog.js"></script>

@GedMarc GedMarc closed this as completed Sep 28, 2020
@GedMarc
Copy link
Owner

GedMarc commented Sep 28, 2020

Please also check the example index for the correct syntax :) and demonstration of closable/not closable :)

closable must be true, in order to set closable settings, e.g. for a button to close it :)

        BootstrapDialog.show({
            message: 'Hi Apple!',
            message: 'You can not close this dialog by clicking outside and pressing ESC key.',
            closable: true,
            closeByBackdrop: false,
            closeByKeyboard: false,
            buttons: [{
                label: 'Close the dialog',
                action: function(dialogRef){
                    dialogRef.close();
                }
            }]
        });

@Hessuss
Copy link
Author

Hessuss commented Sep 29, 2020

Still not work even from your files from examples directory.

Scenario:
Open closable dialog, then click on send button, then make button disabled and modal not closable in any way.
Like nakupanda show on : http://nakupanda.github.io/bootstrap3-dialog/ in 'Manipulating Buttons' section, please take a look on his site.

and my fiddle with youurs scripts v4.3.6
http://jsfiddle.net/4g9x0L8u/1/

on click 'prevent' button still can close by backdrop click.

Please look at this and tell me , i do something wrong or its a bug?

@GedMarc
Copy link
Owner

GedMarc commented Sep 29, 2020

Pls look at this one? rather than starting off negative start on a positive flow - i believe this meets the requirements?
it is something to look at though

http://jsfiddle.net/k0jtmvL8/1/

@Hessuss
Copy link
Author

Hessuss commented Sep 29, 2020

Hi, thanx for answer but still not work :)
Even i set in your code :
dialogRef.setClosable(true);
dialogRef.setCloseByBackdrop(true);
dialogRef.setCloseByKeyboard(true);
after click button "Dialog closable" still cannot close dialog by cliking on backdrop.

http://jsfiddle.net/3hybx5jf/

@GedMarc
Copy link
Owner

GedMarc commented Oct 14, 2020

Can you please check on the latest release?

@GedMarc GedMarc reopened this Oct 14, 2020
@GedMarc GedMarc closed this as completed Oct 15, 2020
@Hessuss
Copy link
Author

Hessuss commented Oct 15, 2020

Hi,
i set bootstrap version to 4.5.2
and your bootstrap-dialog version to 4.3.8
and still when i open dialog as closable and then click button "Dialog UNCLOSABLE" i can close dialog by click on backdrop.
When i open dialog as unclosable and then click on "dialog closable" button i cannot close dialog by backdrop click.
Please take a look on fiddle:
http://jsfiddle.net/xj6o85hy/

@GedMarc GedMarc reopened this Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants