From db1f288299d67473e0078bdd607a03036ec23d2f Mon Sep 17 00:00:00 2001 From: morning-star <26325820+Sight-wcg@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:20:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(laydate):=20=E4=BC=98=E5=8C=96=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9=E5=99=A8=E5=9C=A8Safari=20on=20iOS,?= =?UTF-8?q?=20Firefox=20for=20Android=20=E4=B8=AD=E7=9A=84=E6=BB=91?= =?UTF-8?q?=E5=8A=A8=E6=93=8D=E4=BD=9C=20(#1550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/laydate.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/laydate.js b/src/modules/laydate.js index 41aaf390..2e7d30f0 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -1539,9 +1539,10 @@ }); }); - if(lay.touchEventsSupported()){ - olElem.on('touchstart', function(){ - this.style['overflow-y'] = 'auto'; + if(layui.device().mobile){ + olElem.css({ + overflowY: 'auto', + touchAction: 'pan-y' }) } }