Race conditions can cause .uploader-window to be visible with opacity of 0. It will cause the user to have to refresh the page or inspect the element to hide it. Add a delay in wp.media.view.UploaderWindow.hide() to ensure that the uploader window is indeed hidden.

Props kovshenin.
Fixes #27341.

Built from https://develop.svn.wordpress.org/trunk@28838


git-svn-id: http://core.svn.wordpress.org/trunk@28642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-06-26 01:20:15 +00:00
parent 41ab39f42c
commit 6c3ce75b1c
2 changed files with 9 additions and 2 deletions

View File

@ -3492,6 +3492,13 @@
$el.hide();
}
});
// https://core.trac.wordpress.org/ticket/27341
_.delay( function() {
if ( '0' === $el.css('opacity') && $el.is(':visible') ) {
$el.hide();
}
}, 500 );
}
});

File diff suppressed because one or more lines are too long