Skip to content

onShow called when modal really shown#12

Merged
CreativeDream merged 1 commit intoCreativeDream:masterfrom
Eyepea:master
Jun 9, 2015
Merged

onShow called when modal really shown#12
CreativeDream merged 1 commit intoCreativeDream:masterfrom
Eyepea:master

Conversation

@ghost
Copy link

@ghost ghost commented Jun 8, 2015

Great lib, a pleasure to use it !

A stumbled across a small issue: I need to do some post-processing on some DOM elements in my dialog (ie populate some fields).
I used the onShow, which seems the prefect option for that.
However, it is called at the end of the _modalShow, and at that moment, the new DOM piece is not yet drawn by the browser.
Therefore you can't access your new DOM elements. (you might not notice if your post-processing is slow like for example ajaxing some data)

It therefore makes more sense to call the onShow when the dialog has really finished displaying.
That means in the callback of the fadeIn.

…o DOM elements from your dialog are accessible from your onShow callback
CreativeDream added a commit that referenced this pull request Jun 9, 2015
onShow called when modal really shown
@CreativeDream CreativeDream merged commit 5877856 into CreativeDream:master Jun 9, 2015
@CreativeDream
Copy link
Owner

thanks :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant