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

Checkbox can't select #715

Closed
JasonLiuLiuLiuLiu opened this issue Aug 4, 2019 · 6 comments
Closed

Checkbox can't select #715

JasonLiuLiuLiuLiu opened this issue Aug 4, 2019 · 6 comments

Comments

@JasonLiuLiuLiuLiu
Copy link

Hi,

I use the latest bootbox.all.min.js, and the bootstrap is 3.3.7, and jquery is 3.2.1 , But i can't select the checkbox, can you help me ?

checkbox

@JasonLiuLiuLiuLiu
Copy link
Author

bootbox.prompt({
                        title: "This is a prompt with a set of checkbox inputs!",
                        value: ['1', '3'],
                        inputType: 'checkbox',
                        inputOptions: [{
                                text: 'Choice One',
                                value: '1',
                            },
                            {
                                text: 'Choice Two',
                                value: '2',
                            },
                            {
                                text: 'Choice Three',
                                value: '3',
                            }],
                        callback: function (result) {
                            console.log(result);
                        }
                    });

This the method to call the alert like the example you gived.

@tiesont
Copy link
Member

tiesont commented Aug 4, 2019

I can't reproduce this. Fiddle, with Bootstrap 3.3.7 and Bootbox 5.2.0 (5.3 is just an update to the repo structure): https://jsfiddle.net/v405qts7/

Generally speaking, you'll see this sort of behavior if the for attribute of your labels are duplicated (they all point to one ID) or are invalid (there is no element with a matching ID). If you can, use the developer tools to copy the HTML generated for the dialog and post it here.

@JasonLiuLiuLiuLiu
Copy link
Author

OK, let me try update bootstrap to 5.2.0, I will give you a feedback.

Much Thanks.

@tiesont
Copy link
Member

tiesont commented Aug 5, 2019

There isn't a Bootstrap 5.2. Did you mean Bootbox?

@JasonLiuLiuLiuLiu
Copy link
Author

Sorry, I got it wrong. And i uploaded the code here, can you help me when you are free?
https://jsfiddle.net/zt742hea/

Much Thanks!

@JasonLiuLiuLiuLiu
Copy link
Author

Thank you very much, I found the root cause. The style of the checkbox in my css file conflicts with the checkbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants