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
|
//Listen to the click event
|
||||||
btn.on('click', function (e) {
|
btn.on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
//If the sidebar is not open
|
//If the sidebar is not open
|
||||||
if (!sidebar.hasClass('control-sidebar-open')
|
if (!sidebar.hasClass('control-sidebar-open')
|
||||||
&& !$('body').hasClass('control-sidebar-open')) {
|
&& !$('body').hasClass('control-sidebar-open')) {
|
||||||
|
@ -474,8 +475,8 @@ function _init() {
|
||||||
//Slide over content
|
//Slide over content
|
||||||
if (slide) {
|
if (slide) {
|
||||||
sidebar.addClass('control-sidebar-open');
|
sidebar.addClass('control-sidebar-open');
|
||||||
$('.content-wrapper, .right-side').on('click', function () {
|
$(document).on('click', function () {
|
||||||
_this.close(sidebar, slide);
|
_this.close(sidebar, slide);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//Push the content by adding the open class to the body instead
|
//Push the content by adding the open class to the body instead
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue