-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Keyboard doesn't show for widgets in Bootstrap modal dialogs #462
Comments
Because the dialog is being created using $(document).on('shown.bs.modal', '.modal', function() {
$('.modal input').keyboard({
layout: 'qwerty',
css: {
// input & preview
input: 'form-control input-sm',
// keyboard container
container: 'center-block dropdown-menu', // jumbotron
// default state
buttonDefault: 'btn btn-default',
// hovered button
buttonHover: 'btn-primary',
// Action keys (e.g. Accept, Cancel, Tab, etc);
// this replaces "actionClass" option
buttonAction: 'active',
// used when disabling the decimal button {dec}
// when a decimal exists in the input area
buttonDisabled: 'disabled'
},
usePreview: false
})
// activate the typing extension
.addTyping({
showTyping: true,
delay: 50
});
}).on('hide.bs.modal', '.modal', function() {
// remove keyboards to free up memory
$('.modal input').each(function() {
$(this).data('keyboard').destroy();
});
});
$('button#dialogButton').on('click', function() {
bootbox.dialog({
title: 'User Registration',
message: $('div#wrap').html(),
buttons: {
save: {
label: 'Save',
class: 'btn-success'
},
cancel: {
label: 'Cance',
class: 'btn-default'
}
}
});
}); And you'll need this css to override bootstrap's definition: div.ui-keyboard {
z-index: 2000;
} |
I'm guessing this issue has been resolved, so I'm going to close it. If you continue to have problems, please feel free to continue the discussion in this thread. |
The dialog box is enabled from the same javascript that binds the keyboard to all inputs. The keyboard works perfectly for all inputs in the visible HTML but not for the invisible one that gets enabled when needed (pop up dialog box).
The text was updated successfully, but these errors were encountered: