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

Drag/Swipe over a scroll view - the scroll view ends in invalid state #200

Open
ondrejhanslik opened this issue Apr 25, 2013 · 5 comments
Open

Comments

@ondrejhanslik
Copy link
Contributor

Very weird issue happening (iOS 6.1 Simulator). When I drag or swipe using the methods in UIView+PublicAutomation over a scroll view (or table view or web view), the scroll view correctly scrolls but never stops scrolling (scroll indicator stays visible and the view won't accept any taps).

I have experimented with the code inside UIAutomationBridge (number of points, gesture duration) and logged the UIEvent objects delivered to the app and everything seems to be fine with one exception - the latest events from the drag/swipe have view set to nil.

Maybe the problem is inside UI Automation framework.

@moredip
Copy link
Owner

moredip commented Apr 26, 2013

Is this just in the 6.1 simulator, or in 6.0 too?

Cheers,

Pete

Typed on a little bitty keyboard

On Apr 25, 2013, at 2:53 PM, ondrejhanslik notifications@github.com wrote:

Very weird issue happening (iOS 6.1 Simulator). When I drag or swipe using the methods in UIView+PublicAutomation over a scroll view (or table view or web view), the scroll view correctly scrolls but never stops scrolling (scroll indicator stays visible and the view won't accept any taps).

I have experimented with the code inside UIAutomationBridge (number of points, gesture duration) and logged the UIEvent objects delivered to the app and everything seems to be fine with one exception - the latest events from the drag/swipe have view set to nil.

Maybe the problem is inside UI Automation framework.


Reply to this email directly or view it on GitHub.

@ondrejhanslik
Copy link
Contributor Author

Reproduced on 6.1, 6.0, 5.1 ipad simulators.
Doesn't happen everytime but happens almost everytime.

Currently I am using the scroll helper as a workaround but I don't like tampering with the content offset directly because I depend on the dragging delegate methods.

@moredip
Copy link
Owner

moredip commented Apr 26, 2013

Would you be able to add a example failing test to the Controls app in the repo which demonstrates this issue so I can reproduce locally and look into a fix?

Cheers,

Pete

Typed on a little bitty keyboard

On Apr 26, 2013, at 2:44 AM, ondrejhanslik notifications@github.com wrote:

Reproduced on 6.1, 6.0, 5.1 ipad simulators.
Doesn't happen everytime but happens almost everytime.

Currently I am using the scroll helper as a workaround but I don't like tampering with the content offset directly because I depend on the dragging delegate methods.


Reply to this email directly or view it on GitHub.

@ondrejhanslik
Copy link
Contributor Author

Just tested.

  1. frank update
  2. frank launch
  3. frank console
  4. frankly_map("view:'UIScrollView' first", "swipeInDirection:", "up") or frankly_map("view:'UIScrollView' first", "swipeInDirection:", "down")
  5. It's easily seen because the scroll indicator doesn't hide but you can check by frankly_map("view:'UIScrollView' first", "isDragging")

(it's possible you will have to repeat 4. several times)

@ondrejhanslik
Copy link
Contributor Author

I spent the last couple of days trying to understand this issue and I am sure that:

  1. All the events are correctly delivered
  2. The pan recognizer in the scroll view/table view correctly gets the touch up event and ends the gesture

I was able to reproduce the same error using UI Automation:
tableView.dragInsideWithOptions({startOffset:{x:0.5, y:0.5}, endOffset:{x:0.55, y:0.8}, duration:0.1});
However, with UI Automation the error appears with much lower probability (only once after many tests).

One interesting fact is that the events generated by dragInsideWithOptions are different from the events generated by UIAutomationBridge.

When UIAutomation gesture duration is set to 0.1, the interval between touch down and touch up events is actually 0.2 seconds.

When I tried to change SWIPE_DURATION in UIAutomationBridge to some bigger value, nothing happened. It's strange, but the gesture is always only 0.1 seconds long, and generates only 3 events.

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

2 participants