From abdf2a597728e7080f8943d4d741bee4d358a3d7 Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Sun, 23 Sep 2018 14:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9AiPhoneX=E6=A8=AA?= =?UTF-8?q?=E5=B1=8F=E6=A8=A1=E5=BC=8F=E4=B8=8B=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/wwwroot/js/common-scripts.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Bootstrap.Admin/wwwroot/js/common-scripts.js b/Bootstrap.Admin/wwwroot/js/common-scripts.js index 601de4ec..cb5dbf75 100644 --- a/Bootstrap.Admin/wwwroot/js/common-scripts.js +++ b/Bootstrap.Admin/wwwroot/js/common-scripts.js @@ -166,7 +166,10 @@ $(function () { return this; }, addNiceScroll: function () { - if (!$.browser.versions.ios && $(window).width() > 768) { + if ($.browser.versions.ios && $(window).width() > 768) { + this.css('overflow', 'auto'); + } + else if (!$.browser.versions.ios && $(window).width() > 768) { this.mCustomScrollbar({ theme: 'minimal' }); } else { @@ -180,12 +183,13 @@ $(function () { var $sidebar = $('aside').addNiceScroll().autoScrollSidebar({ target: arch.parent(), offsetTop: arch.parent().innerHeight() / 2 }); $sideMenu.on('click', 'a.dcjq-parent', function () { - if ($(window).width() <= 768) return; - var $this = $(this); - setTimeout(function () { - var offsetScroll = parseInt($this.parents('.mCSB_container').css('top').replace('px', '')); - $sidebar.autoScrollSidebar({ target: $this.parent(), offsetTop: 25.5 - offsetScroll }); - }, 600); + if (!$.browser.versions.ios && $(window).width() > 768) { + var $this = $(this); + setTimeout(function () { + var offsetScroll = parseInt($this.parents('.mCSB_container').css('top').replace('px', '')); + $sidebar.autoScrollSidebar({ target: $this.parent(), offsetTop: 25.5 - offsetScroll }); + }, 600); + } }); $('.sidebar-toggle-box').on('click', function () {