Jump to content
Search Community

ScrollTrigger.normalizeScroll(true) disables the long touch event on Android and IOS mobile devices.

w3specialists.com test
Moderator Tag

Recommended Posts

Dear Support,

 

We are developing a website that has Scroll Smoother applied on the whole page with multiple scrolltriggers applied.

We use normalizescroll(true) globally on all pages so that it follows scroll correctly (Android and IOS).

But this options breaks the <a href> elements on touch hold event.

Specifically on mobile devices when you hold a <a> element it fires the click event.

When we disable normalizescroll it doesnt fire the click event when you hold a <a> element.

 

We created a small codepen to recreate the issue. Please visit it from mobile devide(preferably Android with Chrome). We have fully updated softwares.

See the Pen GRLpbVd by w3specialists (@w3specialists) on CodePen

Link to comment
Share on other sites

  • w3specialists.com changed the title to ScrollTrigger.normalizeScroll(true) disables the long touch event on Android and IOS mobile devices.
Posted (edited)

We have thought a workaround but we don't know if it's optimal.

 

$('a').on('touchstart', function(){
ScrollTrigger.normalizeScroll(false);
setTimeout(function(){
ScrollTrigger.normalizeScroll(true);
ScrollTrigger.refresh();
},400);
});

 

We would appreciate a feedback on it.

Edited by w3specialists.com
sorry for the identation, we tried fixing it
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...