Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollbar locked on mobile #3

Open
joefazee opened this issue Sep 21, 2019 · 10 comments
Open

Scrollbar locked on mobile #3

joefazee opened this issue Sep 21, 2019 · 10 comments

Comments

@joefazee
Copy link

joefazee commented Sep 21, 2019

Hi,

Is anyone experiencing scrollbar locked on mobile? Not sure what the problem is. No error on the console, have checked all css as well.

The issue is only on mobile browsers. Have tested on Safari iOS 13, Chrome on iOS and Android phones. The result is the same. The scrollbar is locked.

EDITED: I noticed modal on that page with form also is blocked.

Thank you in advance.

@thanhphamm
Copy link

I'm also having this issue.

@devs - could this be resolved asap?

Thanks!

@lorddubbs
Copy link

I get this error as well.. Is there a fix?

@jasonkester
Copy link

This component appears to hijack all touchmove (and mousemove) events for the whole containing document, calling e.preventDefault(); as its first order of business. That clobbers anything to do with touch for the rest of the page, which likely isn't what we want to happen.

I fixed it by modifying the move function (that gets bound to that touchmove event on the document), so that it only calls preventDefault if we're actually dragging the slider:

				if (this.flag && this.dragFlag)
				{
					e.preventDefault();

					if (this.stopPropagation)
					{
						e.stopPropagation();
					}
				}

@3dgroup
Copy link

3dgroup commented Oct 23, 2019

This component appears to hijack all touchmove (and mousemove) events for the whole containing document, calling e.preventDefault(); as its first order of business. That clobbers anything to do with touch for the rest of the page, which likely isn't what we want to happen.

I fixed it by modifying the move function (that gets bound to that touchmove event on the document), so that it only calls preventDefault if we're actually dragging the slider:

				if (this.flag && this.dragFlag)
				{
					e.preventDefault();

					if (this.stopPropagation)
					{
						e.stopPropagation();
					}
				}

Do you have a fork with this fix?

@jasonkester
Copy link

Do you have a fork with this fix?

No. I just changed my local copy.

Those few lines are the entire thing.

@Vissie2
Copy link

Vissie2 commented Mar 25, 2020

Is it possible that this is the same problem?
https://i.gyazo.com/f70cee1c511e8b89ad0ddc83fd3312ed.mp4

@askuratovich
Copy link

askuratovich commented Jun 3, 2020

я поменял атрибут "passive: true" с "passive: false" в функции

function addEvent(el, type, fn, capture) {
    el.addEventListener(type, fn, {
      passive: true,
      capture: !!capture
    });
  }

И собственно все заработало. Либо можно пойти более длинным и сложным путем, меня отдельную логику для
addEvent(document, EVENT_TOUCH_MOVE, this._move);

@CouldBeFree
Copy link

Is there any solution to this problem without editing source code?

@brnpimentel
Copy link

я поменял атрибут "passive: true" с "passive: false" в функции

function addEvent(el, type, fn, capture) {
    el.addEventListener(type, fn, {
      passive: true,
      capture: !!capture
    });
  }

И собственно все заработало. Либо можно пойти более длинным и сложным путем, меня отдельную логику для
addEvent(document, EVENT_TOUCH_MOVE, this._move);

this works.

@s-a-rogova
Copy link

There is PR #34 but it's not merged still ((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants