MDL-63094 js: Do not check visibility before hiding backdrop
It's possible for the backdrop to be created during the show, before the modal is actually fully shown. This check is unnecessary because the getBackdrop() function always returns a value and will always succeed.
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -577,10 +577,6 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
|
||||
* @method hide
|
||||
*/
|
||||
Modal.prototype.hide = function() {
|
||||
if (!this.isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.getBackdrop().done(function(backdrop) {
|
||||
if (!this.countOtherVisibleModals()) {
|
||||
// Hide the backdrop if we're the last open modal.
|
||||
|
||||
Reference in New Issue
Block a user