From c1b5fff9c1a3156ac069887778f5caac3a0d2507 Mon Sep 17 00:00:00 2001 From: David Polynar <1795922+polynar@users.noreply.github.com> Date: Thu, 14 Feb 2019 10:24:11 +0100 Subject: [PATCH] Close sidebar in mobile if tap outside --- dist/assets/js/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/assets/js/scripts.js b/dist/assets/js/scripts.js index 8c145e2..77b87ef 100644 --- a/dist/assets/js/scripts.js +++ b/dist/assets/js/scripts.js @@ -203,7 +203,7 @@ $(function() { $("body").addClass("sidebar-gone"); $("body").removeClass("layout-2 layout-3 sidebar-mini sidebar-show"); - $("body").off('click').on('click', function(e) { + $("body").off('click touchend').on('click touchend', function(e) { if($(e.target).hasClass('sidebar-show') || $(e.target).hasClass('search-show')) { $("body").removeClass("sidebar-show"); $("body").addClass("sidebar-gone");