FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Using "UIModalPresentationStyle.Popover" for showModal causes the `closeCallback` to not be called · Issue #7050 · NativeScript/NativeScript · GitHub

Using "UIModalPresentationStyle.Popover" for showModal causes the closeCallback to not be called #7050

Description

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.2.0
  • Cross-platform modules: 5.3.0-next-2019-03-21-142557-02
  • Android Runtime:
  • iOS Runtime: 5.3.0-2019-03-21-073518-01
  • Plugin(s):

Describe the bug
When setting the presentationStyle of the ShowModalOptions to Popover:

ios: {
    presentationStyle: UIModalPresentationStyle.Popover
}

the closeCallback of the ShowModalOptions is never called if you tap outside of the modal view to close it.

To Reproduce

  1. add the tns-platform-declarations to devDependencies: npm i tns-platform-declarations --save-dev
  2. Add references.d.ts to the root of the 'modal-navigation' e2e app with the following content:
    /// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
  3. Change this lines of the 'modal-navigation' e2e app to:
let options: ShowModalOptions = {
    context: "context",
    closeCallback: () => console.log("home-page modal page closed"),
    fullscreen: true,
    ios: {
        presentationStyle: UIModalPresentationStyle.Popover
    },
};
view.showModal(frame, options);

Expected behavior
The closeCallback of the ShowModalOptions is called when you tap outside of the shown modal view in order to close it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL