René's URL Explorer Experiment


Title: Gestures: tap and double tap on the same View · Issue #7281 · NativeScript/NativeScript · GitHub

Open Graph Title: Gestures: tap and double tap on the same View · Issue #7281 · NativeScript/NativeScript

X Title: Gestures: tap and double tap on the same View · Issue #7281 · NativeScript/NativeScript

Description: Environment CLI: latest Cross-platform modules: 5.4.0 Android Runtime: 5.4.0 iOS Runtime: 5.4.0 Describe the bug When you have a tap and double tap gesture recognizer on a view and you attempt to double tap, the tap handler fires. The ta...

Open Graph Description: Environment CLI: latest Cross-platform modules: 5.4.0 Android Runtime: 5.4.0 iOS Runtime: 5.4.0 Describe the bug When you have a tap and double tap gesture recognizer on a view and you attempt to d...

X Description: Environment CLI: latest Cross-platform modules: 5.4.0 Android Runtime: 5.4.0 iOS Runtime: 5.4.0 Describe the bug When you have a tap and double tap gesture recognizer on a view and you attempt to d...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/7281

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Gestures: tap and double tap on the same View","articleBody":"**Environment**\r\n - CLI: latest\r\n - Cross-platform modules:  5.4.0\r\n - Android Runtime:  5.4.0\r\n - iOS Runtime: 5.4.0\r\n\r\n**Describe the bug**\r\nWhen you have a tap and double tap gesture recognizer on a view and you attempt to double tap, the tap handler fires. The tap gesture event should not fire if you're attempting a double tap. Take a look at the \"Additional context\" for the commit that allowed this.\r\n\r\n**To Reproduce**\r\n\r\n```\r\nexport class TestLayout extends StackLayout {\r\n    onLoaded() {\r\n        super.onLoaded();\r\n\r\n        this.on(GestureTypes.tap, () =\u003e console.log('Tapped'));\r\n        this.on(GestureTypes.doubleTap, () =\u003e console.log('Double tapped'));\r\n    }\r\n}\r\n```\r\n\r\nIf you attempt to double tap on the `TestLayout`, the console will show:\r\n\u003e `Tapped`\r\n\u003e `Double tapped`\r\n\r\n**Expected behavior**\r\nIf you try to double tap on a view with a tap gesture recognizer and a double tap gesture recognizer, the double tap event should fire and the tap should not. \r\n\r\n**Additional context**\r\n\r\nI have been working through this issue with @MartoYankov .\r\n\r\n[Here is the commit that allowed simultaneous gesture events](https://github.com/NativeScript/NativeScript/commit/fe72a43e49cc318d7a4cc2488d66aaf9e07feab1)\r\n\r\n[Here are the docs to the delegate method that could be implemented for iOS](https://developer.apple.com/documentation/uikit/uigesturerecognizerdelegate/1624229-gesturerecognizer?language=objc)\r\n- I have already implemented this ^ for iOS (see below). The issue now is getting the same functionality for Android.\r\n\r\n\r\n**Potential solution (iOS)**\r\n\r\n`gestures.ios.ts`\r\n```\r\nclass UIGestureRecognizerDelegateImpl extends NSObject implements UIGestureRecognizerDelegate {\r\n    public static ObjCProtocols = [UIGestureRecognizerDelegate];\r\n\r\n    public gestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer(gestureRecognizer: UIGestureRecognizer, otherGestureRecognizer: UIGestureRecognizer): boolean {\r\n        // If both gesture recognizers are of type UITapGestureRecognizer, do not allow\r\n        // simultaneous recognition.\r\n        if (gestureRecognizer instanceof UITapGestureRecognizer \u0026\u0026 otherGestureRecognizer instanceof UITapGestureRecognizer) {\r\n            return false;\r\n        }\r\n        return true;\r\n    }\r\n\r\n    public gestureRecognizerShouldRequireFailureOfGestureRecognizer(gestureRecognizer: UIGestureRecognizer, otherGestureRecognizer: UIGestureRecognizer): boolean {\r\n        // If both gesture recognizers are of type UITapGestureRecognizer \u0026 one of them is a doubleTap,\r\n        // we must require a failure.\r\n        if (gestureRecognizer instanceof UITapGestureRecognizer\r\n            \u0026\u0026 otherGestureRecognizer instanceof UITapGestureRecognizer\r\n            \u0026\u0026 otherGestureRecognizer.numberOfTapsRequired === 2) {\r\n            return true;\r\n        }\r\n        return false;\r\n    }\r\n}\r\n```","author":{"url":"https://github.com/MCurran16","@type":"Person","name":"MCurran16"},"datePublished":"2019-05-23T18:45:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7281/NativeScript/issues/7281"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:671e57ff-1b62-5f92-6fec-b04ed4bf7d4d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDB72:2F9E:1D03490:255B6AD:69749E99
html-safe-nonce77bbb050f14e3e3e4aadb0b1a5d0eed8fd820a1ab48934f3649c32664128c5c9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjcyOjJGOUU6MUQwMzQ5MDoyNTVCNkFEOjY5NzQ5RTk5IiwidmlzaXRvcl9pZCI6IjgwNTU4NDA4NjY0OTU3NzExMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac48c8700a1b868a3dbe4f118d4fe3fcc3f530c8bdbdf599f4a96c9d4f1234c093
hovercard-subject-tagissue:447817253
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/7281/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b840b32937ecd397f4e9b0195cbccd4f289bb03d2fef5a8b7d406faf0e497b2c/NativeScript/NativeScript/issues/7281
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b840b32937ecd397f4e9b0195cbccd4f289bb03d2fef5a8b7d406faf0e497b2c/NativeScript/NativeScript/issues/7281
og:image:altEnvironment CLI: latest Cross-platform modules: 5.4.0 Android Runtime: 5.4.0 iOS Runtime: 5.4.0 Describe the bug When you have a tap and double tap gesture recognizer on a view and you attempt to d...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMCurran16
hostnamegithub.com
expected-hostnamegithub.com
None4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release488b30e96dfd057fbbe44c6665ccbc030b729dde
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/7281#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F7281
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F7281
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/7281
Reloadhttps://github.com/NativeScript/NativeScript/issues/7281
Reloadhttps://github.com/NativeScript/NativeScript/issues/7281
NativeScript https://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Please reload this pagehttps://github.com/NativeScript/NativeScript/issues/7281
Notifications https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.4k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://github.com/NativeScript/NativeScript
Issues 869 https://github.com/NativeScript/NativeScript/issues
Pull requests 58 https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects 0 https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security 0 https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
Code https://github.com/NativeScript/NativeScript
Issues https://github.com/NativeScript/NativeScript/issues
Pull requests https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/7281
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/7281
Gestures: tap and double tap on the same Viewhttps://github.com/NativeScript/NativeScript/issues/7281#top
enhancementhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22enhancement%22
help wantedhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com/MCurran16
https://github.com/MCurran16
MCurran16https://github.com/MCurran16
on May 23, 2019https://github.com/NativeScript/NativeScript/issues/7281#issue-447817253
@MartoYankovhttps://github.com/MartoYankov
Here is the commit that allowed simultaneous gesture eventshttps://github.com/NativeScript/NativeScript/commit/fe72a43e49cc318d7a4cc2488d66aaf9e07feab1
Here are the docs to the delegate method that could be implemented for iOShttps://developer.apple.com/documentation/uikit/uigesturerecognizerdelegate/1624229-gesturerecognizer?language=objc
enhancementhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22enhancement%22
help wantedhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.