mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Fixed a problem click propagation for the control sidebar toggle button
This commit is contained in:
Vendored
+4
-3
@@ -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
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user