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

Improving the onClose event #298

Closed
dioslaska opened this Issue Mar 23, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@dioslaska
Copy link
Contributor

dioslaska commented Mar 23, 2015

Currently the onClose event runs before the new value is set. There are situations where the user would like to work with the selected value, regardless if Set or Cancel was set. This cannot be done, because in case of a new selection the value is not yet assigned at the time of the onClose event.

Possible solutions:

  1. Rename the current onClose event to onBeforeClose. Fire a new event named onClose after the value is already set. BRAKES BACKWARD COMPATIBILTY
  2. Create a new event, e.g. onAfterClose, which runs after the value is set. Naming is not consistent (e.g. with onBeforeShow and onShow).
@shamank

This comment has been minimized.

Copy link

shamank commented Jun 23, 2015

I recently ran into a similar situation. I needed to re-attach a custom scroller (skrollr) after the popup (with the mobiscroll component) was completly closed and destroyed from the DOM (skrollr needs to recalculate page heights and stuff like that) and I had to resort to ugly code to make it works.

This event is really necessary.

@dioslaska

This comment has been minimized.

Copy link
Contributor

dioslaska commented Sep 1, 2015

Added, will be released in 2.17.0

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