Skip to content

Commit

Permalink
Removes unnecessary code to add and remove modal-open.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinfunk committed Aug 16, 2019
1 parent 7d1ceae commit 5014d76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
15 changes: 4 additions & 11 deletions themes/one/assets/js/one.script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions themes/one/src/js/one.script.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,10 @@ import '@fortawesome/fontawesome-free/js/all';

$(document).ready(function () {
if (lbm.dialog('isOpen') === true) {
// Add bootstrap class modal-open to prevent background scroll.
$('body').addClass( 'modal-open');
// Close modal if clicked outside and remove modal-open.
// Close modal if clicked outside.
$('.ui-widget-overlay').bind('click', function () {
lbm.dialog('close');
$('body').removeClass('modal-open');
});
// Remove modal-open if using the X to close the modal.
$('.ui-dialog-titlebar-close').bind('click', function () {
$('body').removeClass('modal-open');
})
}
});
}
Expand Down

0 comments on commit 5014d76

Please sign in to comment.