Title: [iOS] Issue while opening dialogs inside a modal · Issue #2375 · NativeScript/nativescript-angular · GitHub
Open Graph Title: [iOS] Issue while opening dialogs inside a modal · Issue #2375 · NativeScript/nativescript-angular
X Title: [iOS] Issue while opening dialogs inside a modal · Issue #2375 · NativeScript/nativescript-angular
Description: Environment package.json "nativescript": { "id": "
Open Graph Description: Environment package.json "nativescript": { "id": "
X Description: Environment package.json "nativescript": { "id": "<id>", "tns-ios": { "version": "6.5.4" }, "tns-android": { "versio...
Opengraph URL: https://github.com/NativeScript/nativescript-angular/issues/2375
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[iOS] Issue while opening dialogs inside a modal","articleBody":"**Environment**\r\n\r\npackage.json\r\n```{\r\n \"nativescript\": {\r\n \"id\": \"\u003cid\u003e\",\r\n \"tns-ios\": {\r\n \"version\": \"6.5.4\"\r\n },\r\n \"tns-android\": {\r\n \"version\": \"6.5.3\"\r\n }\r\n },\r\n \"description\": \"NativeScript Application\",\r\n \"license\": \"SEE LICENSE IN \u003cyour-license-filename\u003e\",\r\n \"repository\": \"\u003cfill-your-repository-here\u003e\",\r\n \"dependencies\": {\r\n \"@angular/animations\": \"8.0.0\",\r\n \"@angular/common\": \"8.0.0\",\r\n \"@angular/compiler\": \"8.0.0\",\r\n \"@angular/core\": \"8.0.0\",\r\n \"@angular/forms\": \"8.0.0\",\r\n \"@angular/http\": \"8.0.0-beta.10\",\r\n \"@angular/platform-browser\": \"8.0.0\",\r\n \"@angular/platform-browser-dynamic\": \"8.0.0\",\r\n \"@angular/router\": \"8.0.0\",\r\n \"@microsoft/applicationinsights-channel-js\": \"file:microsoft-applicationinsights-channel-js-2.5.8.tgz\",\r\n \"@microsoft/applicationinsights-web\": \"2.5.9\",\r\n \"@progress/kendo-date-math\": \"^1.5.1\",\r\n \"@types/file-saver\": \"^2.0.1\",\r\n \"compare-versions\": \"^3.6.0\",\r\n \"email-validator\": \"^2.0.4\",\r\n \"jwt-decode\": \"^3.1.2\",\r\n \"moment\": \"^2.27.0\",\r\n \"nativescript-angular\": \"^8.21.0\",\r\n \"nativescript-appversion\": \"^1.4.4\",\r\n \"nativescript-background-http\": \"^4.2.0\",\r\n \"nativescript-email\": \"^1.6.0\",\r\n \"nativescript-exit\": \"^1.0.1\",\r\n \"nativescript-fingerprint-auth\": \"^7.0.2\",\r\n \"nativescript-http-formdata\": \"^3.0.1\",\r\n \"nativescript-imagepicker\": \"^7.1.0\",\r\n \"nativescript-iqkeyboardmanager\": \"^1.5.1\",\r\n \"nativescript-modal-datetimepicker\": \"^1.2.2\",\r\n \"nativescript-multi-select\": \"^1.0.6\",\r\n \"nativescript-numeric-keyboard\": \"^4.3.1\",\r\n \"nativescript-pdf-view\": \"^2.2.0\",\r\n \"nativescript-permissions\": \"^1.3.9\",\r\n \"nativescript-phone\": \"^3.0.1\",\r\n \"nativescript-plugin-firebase\": \"^10.5.2\",\r\n \"nativescript-rater\": \"^2.1.2\",\r\n \"nativescript-screen-orientation\": \"^2.0.0\",\r\n \"nativescript-theme-core\": \"~1.0.4\",\r\n \"nativescript-toasts\": \"^1.0.3\",\r\n \"nativescript-ui-calendar\": \"^6.1.0\",\r\n \"nativescript-ui-listview\": \"^8.2.0\",\r\n \"nativescript-ui-sidedrawer\": \"^8.0.1\",\r\n \"password-validator\": \"^5.1.2\",\r\n \"reflect-metadata\": \"~0.1.12\",\r\n \"rxjs\": \"~6.3.0\",\r\n \"tns-core-modules\": \"^6.5.12\",\r\n \"zone.js\": \"0.9.1\"\r\n },\r\n \"devDependencies\": {\r\n \"@angular/compiler-cli\": \"8.0.0\",\r\n \"@nativescript/schematics\": \"^0.7.3\",\r\n \"@ngtools/webpack\": \"8.0.0\",\r\n \"chalk\": \"^4.1.0\",\r\n \"codelyzer\": \"~4.5.0\",\r\n \"minimist\": \"^1.2.5\",\r\n \"nativescript-dev-webpack\": \"^1.5.1\",\r\n \"node-sass\": \"4.12.0\",\r\n \"plist\": \"^3.0.2\",\r\n \"replace-in-file\": \"^6.1.0\",\r\n \"tns-android\": \"6.5.3\",\r\n \"tns-ios\": \"6.5.4\",\r\n \"tns-platform-declarations\": \"^6.5.12\",\r\n \"tslint\": \"~5.11.0\",\r\n \"typescript\": \"3.4.5\"\r\n },\r\n \"readme\": \"NativeScript Application\"\r\n}\r\n```\r\n \r\n**Describe the bug**\r\nThis problem only seems to exist on iOS 12 or older. \r\n\r\nI'm using TextField to 'fake' select dropdown by listening for a (tap) event on them and then opening a Dialog. Opening a dialog inside of a modal requires 2 clicks. Dialog will only open on the second click and once you select an action from it and close the modal, the second dialog (first click) opens.\r\n\r\nOccasionally I will get an error when opening a modal:\r\n\r\n\u003e TypeError: undefined is not an object (evaluating 'data.startDate')\r\n\r\n**Expected behavior**\r\n\r\nTo be able to open dialogs inside a modal.\r\n\r\n**Additional context**\r\n\r\nOpening modal:\r\n```\r\npublic showModal(): void {\r\n this.onFocus();\r\n let options = {\r\n context: {\r\n data: data\r\n },\r\n fullscreen: true,\r\n viewContainerRef: this.vcRef\r\n };\r\n this.modal.showModal(ModalViewComponent, options).then(res =\u003e {\r\n this.getAllReports();\r\n });\r\n}\r\n```\r\n\r\nOpening dialog:\r\n```\r\n\u003cStackLayout class=\"form-group\"\u003e\r\n \u003cLabel text=\"Supervisor\" class=\"label m-b-0\"\u003e\u003c/Label\u003e\r\n \u003cTextField hint=\"Select\" class=\"input input-border\" [(ngModel)]=\"selectedSupervisor\" [text]=\"selectedSupervisor\" (tap)=\"openDialog('Supervisors', supervisors)\" editable=\"false\"\u003e\u003c/TextField\u003e\r\n\u003c/StackLayout\u003e\r\n```\r\n\r\n```\r\nopenDialog(name: string, data): void {\r\n this.onFocus();\r\n let options;\r\n options = {\r\n title: `Select ${name}`,\r\n actions: data.map(x =\u003e x.name),\r\n cancelButtonText: \"Cancel\",\r\n };\r\n action(options).then((result) =\u003e {\r\n if (result === \"Cancel\") {\r\n } else {\r\n if(name === 'Supervisors') {\r\n this.selectedSupervisor = result;\r\n }\r\n }\r\n });\r\n}\r\n```\r\n\r\nDemo:\r\n\r\nhttps://user-images.githubusercontent.com/15087423/156002086-1b981014-1d7c-4667-af7f-593d2cea415e.mp4","author":{"url":"https://github.com/adammo14","@type":"Person","name":"adammo14"},"datePublished":"2022-02-28T14:43:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2375/nativescript-angular/issues/2375"}
| 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:4865b25d-5817-d17e-b436-868eb6ddaa4c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BED8:2A6262:559DFF:6D0BEA:69744501 |
| html-safe-nonce | 41063686b27128c361cf322fc1b235cbf1691049ad57f1515f9d7a6ab0f7d47e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUQ4OjJBNjI2Mjo1NTlERkY6NkQwQkVBOjY5NzQ0NTAxIiwidmlzaXRvcl9pZCI6IjIwNjc0NTMzNTk0NzkzNDIzMzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | df9b96e3a8dddc43353493596e5c24e9e15a69cecf0235be5ea66743b87f5106 |
| hovercard-subject-tag | issue:1154176308 |
| 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-angular/2375/issue_layout |
| twitter:image | https://opengraph.githubassets.com/378c9326a9c1c96f893a777e2352514add7bc09fe607f2b6a433efa9ca7576fb/NativeScript/nativescript-angular/issues/2375 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/378c9326a9c1c96f893a777e2352514add7bc09fe607f2b6a433efa9ca7576fb/NativeScript/nativescript-angular/issues/2375 |
| og:image:alt | Environment package.json "nativescript": { "id": " |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adammo14 |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-angular git https://github.com/NativeScript/nativescript-angular.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 35951404 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35951404 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-angular |
| 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 | 56fe7e2e8de6e57740bca50402351ea656f7a4bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width