Skip to content

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

Closed

Description

@VladimirAmiorkov

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

  1. ghost removed on May 8, 2019
  2. lock commented on May 20, 2020

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  3. locked and limited conversation to collaborators on May 20, 2020
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