Title: TextField onBlur event is not firing · Issue #8537 · NativeScript/NativeScript · GitHub
Open Graph Title: TextField onBlur event is not firing · Issue #8537 · NativeScript/NativeScript
X Title: TextField onBlur event is not firing · Issue #8537 · NativeScript/NativeScript
Description: I'm building an app with NativeScript 6.4.1 and Angular 8. My objective: dismiss the keyboard if the user taps outside of the text box. I have read the documentation here: https://docs.nativescript.org/angular/ui/ng-components/text-field...
Open Graph Description: I'm building an app with NativeScript 6.4.1 and Angular 8. My objective: dismiss the keyboard if the user taps outside of the text box. I have read the documentation here: https://docs.nativescript...
X Description: I'm building an app with NativeScript 6.4.1 and Angular 8. My objective: dismiss the keyboard if the user taps outside of the text box. I have read the documentation here: https://docs.nativesc...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/8537
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TextField onBlur event is not firing","articleBody":"I'm building an app with NativeScript 6.4.1 and Angular 8.\r\n\r\nMy objective: dismiss the keyboard if the user taps outside of the text box.\r\n\r\nI have read the documentation here: \r\nhttps://docs.nativescript.org/angular/ui/ng-components/text-field\r\n\r\nIt indicates that there is indeed a 'blur' event that I can use.\r\n\r\nFrom the documentation:\r\n\r\n```\r\n\u003cTextField hint=\"Enter Date\" \r\n [text]='name' \r\n secure=\"false\"\r\n keyboardType=\"datetime\"\r\n returnKeyType=\"done\" \r\n (returnPress)=\"onReturnPress($event)\"\r\n autocorrect=\"false\"\r\n maxLength=\"10\"\r\n (focus)=\"onFocus($event)\" \r\n (blur)=\"onBlur($event)\"\u003e\r\n\u003c/TextField\u003e\r\n```\r\nI have tried to implement this 'blur' even in my code and the event does not appear to fire. Here is my playground: https://play.nativescript.org/?template=play-ng\u0026id=vLwHYf\u0026v=4\r\n\r\ncode snippet:\r\n\r\n```\r\n \u003cTextField \r\n (blur)=\"onBlur($event)\" \r\n returnKeyType=\"done\"\r\n autocorrect=\"false\" \r\n autocapitalizationType=\"none\"\u003e\r\n \u003c/TextField\u003e\r\n\r\npublic onBlur(args) {\r\n console.log(' on blur '); //this code is not executed\r\n var myTextField = args.object;\r\n myTextField.dismissSoftInput();\r\n}\r\n```","author":{"url":"https://github.com/aubrey-fowler","@type":"Person","name":"aubrey-fowler"},"datePublished":"2020-04-16T16:07:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/8537/NativeScript/issues/8537"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d26f4a9d-fd56-c349-821e-0bbe28273091 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B212:B411C:5839536:77DAE55:69733457 |
| html-safe-nonce | 9f52323740f6e55d398435da06068fe3b85f37973c9dd5667ca659e373cc0416 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjEyOkI0MTFDOjU4Mzk1MzY6NzdEQUU1NTo2OTczMzQ1NyIsInZpc2l0b3JfaWQiOiIyMTgzNzgyMzk4MzY3NTc3MTc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 856e491b81d39bfd2924162343cf87c2404cec1b8fcf0250c058dcf47f7c6c05 |
| hovercard-subject-tag | issue:601209280 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/8537/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b6fcc86824d9c92baabd3beca86330720bd741c70db46726a5aea240605f349/NativeScript/NativeScript/issues/8537 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b6fcc86824d9c92baabd3beca86330720bd741c70db46726a5aea240605f349/NativeScript/NativeScript/issues/8537 |
| og:image:alt | I'm building an app with NativeScript 6.4.1 and Angular 8. My objective: dismiss the keyboard if the user taps outside of the text box. I have read the documentation here: https://docs.nativescript... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aubrey-fowler |
| hostname | github.com |
| expected-hostname | github.com |
| None | 44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a5e2b48bd1260476599758f5d253b5d24092ab84 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width