mirror of https://github.com/ColorlibHQ/AdminLTE
Fixed a problem click propagation for the control sidebar toggle button
parent
b80104171d
commit
c0280e2819
|
@ -444,6 +444,7 @@ function _init() {
|
|||
//Listen to the click event
|
||||
btn.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
//If the sidebar is not open
|
||||
if (!sidebar.hasClass('control-sidebar-open')
|
||||
&& !$('body').hasClass('control-sidebar-open')) {
|
||||
|
@ -474,9 +475,9 @@ function _init() {
|
|||
//Slide over content
|
||||
if (slide) {
|
||||
sidebar.addClass('control-sidebar-open');
|
||||
$('.content-wrapper, .right-side').on('click', function () {
|
||||
_this.close(sidebar, slide);
|
||||
});
|
||||
$(document).on('click', function () {
|
||||
_this.close(sidebar, slide);
|
||||
});
|
||||
} else {
|
||||
//Push the content by adding the open class to the body instead
|
||||
//of the sidebar itself
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue