Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove latency from Modal.onDismiss #6702

Closed
Bouzmine opened this issue May 31, 2016 · 5 comments
Closed

Remove latency from Modal.onDismiss #6702

Bouzmine opened this issue May 31, 2016 · 5 comments
Assignees

Comments

@Bouzmine
Copy link
Contributor

Short description of the problem:

I have a modal to input data which is then added to a list after the modal closes, but the new element only appears after the Modal animation end. I measured about 675 ms of latency in my project and 330 ms in Plunkr (less dependencies).

What behavior are you expecting?

300-675 ms of latency

Steps to reproduce:

  1. Create a modal and a root page
  2. Launch the modal and return data from it
  3. Use console.time (before viewCtrl.dismiss and in Modal.onDismiss) to measure how long it took to return data.

Which Ionic Version? 2.x

Plunker that shows an example of your issue

http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview

Run ionic info from terminal/cmd prompt:

Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.7-201605271904
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.0.0
Xcode version: Xcode 7.3.1 Build version 7D1014

@jgw96 jgw96 added the v2 label May 31, 2016
@manucorporat manucorporat self-assigned this Jun 2, 2016
@manucorporat
Copy link
Contributor

manucorporat commented Jun 2, 2016

@Bouzmine We understand your use case, I am going to evaluate adding a new callback that it's executed just after the modal is closed (without delay). Probably something like onWillDismiss, not sure yet.

@iignatov
Copy link
Contributor

@Bouzmine As a workaround you could speed-up the closing of the modal by passing NavOptions to the ViewController.dismiss() method and specifying the duration (or disable the animation altogether).

@Bouzmine
Copy link
Contributor Author

I do think it's a great workaround but it's by no mean a replacement for a proper onWillDismiss method.

@iignatov
Copy link
Contributor

it's a great workaround but it's by no mean a replacement for a proper onWillDismiss method.

I agree, I mentioned the workaround in case that you want to solve your problem until it's implemented.

@manucorporat
Copy link
Contributor

@Bouzmine @iignatov #7060

manucorporat added a commit to manucorporat/ionic that referenced this issue Jun 30, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants