drafts: Fix CSS transition when opening drafts.

The code was all there, but we weren't triggering a style calculation.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2019-03-07 19:12:34 -08:00 committed by Tim Abbott
parent 9f7e90f68b
commit 674abdef43
1 changed files with 5 additions and 0 deletions

View File

@ -343,6 +343,11 @@ exports.launch = function () {
exports.remove_old_drafts();
var drafts = format_drafts(draft_model.get());
render_widgets(drafts);
// We need to force a style calculation on the newly created
// element in order for the CSS transition to take effect.
$('#draft_overlay').css('opacity');
exports.open_modal();
exports.set_initial_element(drafts);
setup_event_handlers();