-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
[macOS] Clicking on the post list text, the NavigationLink isn't triggered #9
Comments
Was looking at this issue since it was the first thing I noticed when trying the app out. I believe the This is my first look at SwiftUI, so I'm not sure it's even possible to reproduce the |
Actually, just discovered the double tap only works on top of the labels (where now the tap is not detected). Wanted to add that since I didn't see in the bug description. |
Quite a lot of changes in order to achieve this: - had to activate the navigation link programmatically in order to capture single and double tap - NavigationLink activated based on new view state for selected post tag - moved the RequestView to the ContentView so the selected post wouldn't reload the whole PostList and retriever the request - PostList now initialised with Listing object - setting the contentShape of the PostView in the list in order to capture hits in the whole area, otherwise it would land on the NavigationLink behind - adding two tap gestures in order of precedence - set the default frame for the new spinner to guarantee a minimum size while loading The only secondary effect from this solution I wasn't able to fix is that now cells don't get a selected state like before. I accept suggestions.
Gave it another try, went a bit deeper and I have a proposal. Only side effect is that cells now don't get a selected state |
What happens:
When clicking on any of the text, or elements, that are in the List on macOS, the NavigationLink destination isn't triggered.
An example:
![macOS](https://user-images.githubusercontent.com/3119506/67151764-3aa26380-f27f-11e9-8a37-a6f36825da7d.png)
When clicking on the text that is enclosed within the red box,
The
PostDetailView
destination does not get triggered.The only way to trigger the
PostDetailView
is to click outside of the Text elements.Additional details:
Removing the
.onTapGesture(count: 2)
from macOS'PostView
will allow the clicks to be passed through again. Though, this obviously removes the double click to open a new window functionality.The text was updated successfully, but these errors were encountered: