em icon indicating copy to clipboard operation
em copied to clipboard

[iOS PWA] Stop scrolling during gesture

Open raineorshine opened this issue 5 years ago • 12 comments

Stop scrolling as soon as a gesture has been initiated. Re-enable as soon as the gesture ends. See MultiGesture component.

A "gesture" is any sequence of swipes, for example right-down, left-up, right-left-down, etc. A gesture must begin with left or right, otherwise it would conflict with scrolling. When a left or right swipe is made, the MultiGesture's onPanResponderMove will detect this and call onGesture. This is the moment where scrolling should be disabled. This works in the current build. The problem is when the user has moved slightly up or down first and initiated a scroll. In this case, as long as the scroll amount is within a threshold of just a few pixels, the scroll should be STOPPED so that the user can finish the sequence of swipes without any scrolling. So far I have not been able to find a way of stopping scrolling in Mobile Safari after the scroll event has already started. You can see the disableScroll that attempts to disable the scroll.

There must be a way to be stop scrolling mid-scroll on desktop and mobile.

raineorshine avatar Nov 29 '19 05:11 raineorshine

Tested body-scroll-lock. Not able to stop mid-scroll on mobile Safari.

raineorshine avatar Dec 11 '19 02:12 raineorshine

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.0 ETH (255.77 USD @ $255.77/ETH) attached to it as part of the cybersemics fund.

gitcoinbot avatar Feb 17 '20 03:02 gitcoinbot

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 month, 3 weeks ago. Please review their action plans below:

1) phantomcracker has started work.

Requirements:

  • Stop scrolling as soon as a gesture has been initiated. Re-enable as soon as the gesture ends. 2) sesamestrong has started work.

I will just use basic props to MultiGesture. 3) ollutr has started work.

0x46E4f59609Bd54fe53E4a1Fe608264a37a3cBB51 4) jasondrogo has started work.

I will deliver it with requirements provided 5) thevertex has started work.

I would like to discuss, many years experience and best there is ;) First time using Bounties, would you like to talk? 6) oldas1 has started work.

Stop scrolling as soon as a gesture has been initiated. Re-enable as soon as the gesture ends. See MultiGesture component. 7) igormuba has started work.

I am cloning and I am doing some tests now just to understand the code architecture, will fork, edit and make a PR when I understand what is happening and what to change 8) cdharmateja has started work.

I will look into this and try to solve the issue 9) arun0930 has started work.

0x7F4B0fc7c8BD0fe9e472B9F66e89EEC1BE52089f 10) arun0930 has started work.

0x7F4B0fc7c8BD0fe9e472B9F66e89EEC1BE52089f

Learn more on the Gitcoin Issue Details page.

gitcoinbot avatar Feb 17 '20 03:02 gitcoinbot

@raineorshine what about when the scrolling is caused by adding more new items/sub-items to the list? How should it be handled, should it still be stopped?

mul1sh avatar Feb 17 '20 17:02 mul1sh

@mul1sh This issue only concerns stopping scrolling during a gesture. I'm not aware of a way for new thoughts to get added before a gesture completes.

raineorshine avatar Feb 17 '20 18:02 raineorshine

Oh ok got it, sorry I had misread the title.

mul1sh avatar Feb 17 '20 18:02 mul1sh

@raineorshine can you give me an exemple of how to reproduce the behavior we are trying to avoid? What gesture do I do, where, and how, to see this "scroll during gesture"? Thank you.

igormuba avatar Feb 26 '20 17:02 igormuba

@igormuba I updated the issue description with more detail. The swipe can be initiated anywhere on the screen. I am able to best reproduce it on my iPhone. Let me know if you have more questions.

raineorshine avatar Feb 26 '20 19:02 raineorshine

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.0 ETH (131.55 USD @ $131.55/ETH) has been submitted by:

  1. @igormuba
  2. @mul1sh

@raineorshine please take a look at the submitted work:

  • PR by @mul1sh
  • PR by @igormuba

gitcoinbot avatar Feb 28 '20 19:02 gitcoinbot

@raineorshine is this still open? if so, would like to submit my PR later today. Thanks.

mul1sh avatar Mar 31 '20 10:03 mul1sh

@mul1sh Yes, it is yet unsolved.

raineorshine avatar Mar 31 '20 17:03 raineorshine

@raineorshine thanks I've pushed my fix, kindly check

mul1sh avatar Apr 01 '20 15:04 mul1sh

  • scroll preventDefault
  • touchmove preventDefault - Does not work during scroll.
  • overflow: hidden - Does not work during scroll.
  • position: fixed - Works during scroll. Automatically scrolls to top, so top must be set to simulate the scroll position and then cleared when position is cleared. Scroll bar still appears and moves with touchmove.

raineorshine avatar Oct 30 '22 21:10 raineorshine