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

UITableView's didSelectRowAt not called after swiping #164

Closed
1 of 3 tasks
peterstojanowski opened this issue Mar 18, 2019 · 18 comments
Closed
1 of 3 tasks

UITableView's didSelectRowAt not called after swiping #164

peterstojanowski opened this issue Mar 18, 2019 · 18 comments

Comments

@peterstojanowski
Copy link

Short description

There is a really annoying bug when the contentViewController of the FloatingPanelController has a UITableView. When you swipe up or down quickly so that the floating panel bounces a bit at the end of animation, the first tap on UITableView cell is ignored - the delegate method tableView:didSelectRowAt: is not called. It's being called the second time you tap on a cell or when you swipe slowly and then tap. There must be an issue with intercepting some gestures when UIScrollView decelerates but I didn't have much time to investigate properly.

Expected behavior

The tableView:didSelectRowAt: is called every time.

Actual behavior

The tableView:didSelectRowAt: is not called the first time after scrolling quickly.

Steps to reproduce

Can be easily reproduced using the Maps example by adding some logs to tableView:didSelectRowAt: to see they are not printed out after scrolling fast and tapping on a cell.

Code example that reproduces the issue

Environment

Library version
1.4.0
Installation method

  • CocoaPods
  • Carthage
  • Git submodules

iOS version(s)
12
Xcode version
10.1

@RpX974
Copy link

RpX974 commented Apr 1, 2019

Hi, I have the same issue.
Did you find a solution ?

@scenee
Copy link
Owner

scenee commented Apr 4, 2019

I acknowledged this issue. I will try to fix it.

@scenee
Copy link
Owner

scenee commented Apr 6, 2019

How about fix-tap-abort branch(7a51219)?

@peterstojanowski
Copy link
Author

Yes, this fixes the issue. Thanks.

@RpX974
Copy link

RpX974 commented Apr 6, 2019

Still same for me :/

@peterstojanowski
Copy link
Author

I double checked that on the Maps example and looks like it's only partially fixed. It works now when you swipe up from tip to half and half to full but it's still broken when you swipe from full to half.
@RpX974 can you confirm that?

@RpX974
Copy link

RpX974 commented Apr 6, 2019

I'm using from tip to full, so I can confirm for that. I will try the other ways.

@RpX974
Copy link

RpX974 commented Apr 6, 2019

Yes, from tip to half, it works

@RpX974
Copy link

RpX974 commented Apr 6, 2019

Nevermind, it doesn't work too, I scrolled before when I tried from tip to half.

@RpX974
Copy link

RpX974 commented Apr 6, 2019

Ok, I found something. When I try to change the height constraint of a view in "floatingPanelDidChangePosition" for the tip position, I got the issue. But if I don't change the height, I don't have the issue.

@scenee
Copy link
Owner

scenee commented Apr 18, 2019

@peterstojanowski
Copy link
Author

@scenee I doubt that. This issue can be reproduced using Xcode 10.1. The bugs you're talking about are related to Xcode 10.2.

@scenee
Copy link
Owner

scenee commented Apr 18, 2019

Thanks for your quick feedback, @peterstojanowski 😀
I struggled with this issue for a while and at last I found a solution to make it better!
I know it doesn't defeat this issue completely, but eases the problem.
I pushed 9076ba8 commit. I'm pleased to check it out 👍

@scenee
Copy link
Owner

scenee commented Apr 19, 2019

Hmm.... the commit is still only partially fixed...

@congmn
Copy link

congmn commented Apr 19, 2019

I found out that Apple Maps has the same bug on the latest version (iOS 12.2)

@scenee
Copy link
Owner

scenee commented Apr 20, 2019

Thanks for your sharing, @congmn!
Then I think it's hard to fix this issue completely without modifying a tap gesture handling of UITableView. So I'm going to merge #185 to master.

@ThangTruong921
Copy link

I have a suggestion to solve this problem.
You can put the button into the cells of the table.
I succeeded with this solution.

@scenee
Copy link
Owner

scenee commented Apr 24, 2019

I merged a solution into master to ease this issue 👍 Thanks all 🎉
I closed this issue for now, but I would like to fix it as expected so welcome any ideas and mentions for this 😌.

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

5 participants