Merge pull request #491 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2020-08-31 17:19:01 +03:00 committed by GitHub
commit ef3bc98572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -693,13 +693,12 @@ define([
mask.attr('counter', parseInt(mask.attr('counter'))+1); mask.attr('counter', parseInt(mask.attr('counter'))+1);
mask.show(); mask.show();
} else { } else {
var opacity = mask.css('opacity');
mask.css('opacity', 0); mask.css('opacity', 0);
mask.attr('counter', parseInt(mask.attr('counter'))+1); mask.attr('counter', parseInt(mask.attr('counter'))+1);
mask.show(); mask.show();
setTimeout(function () { setTimeout(function () {
mask.css(_getTransformation(opacity)); mask.css(_getTransformation('0.2'));
}, 1); }, 1);
} }
@ -785,12 +784,11 @@ define([
if ( hide_mask ) { if ( hide_mask ) {
if (this.options.animate !== false) { if (this.options.animate !== false) {
var opacity = mask.css('opacity');
mask.css(_getTransformation(0)); mask.css(_getTransformation(0));
setTimeout(function () { setTimeout(function () {
mask.css('opacity', opacity);
if (parseInt(mask.attr('counter'))<1) { if (parseInt(mask.attr('counter'))<1) {
mask.css('opacity', '0.2');
mask.hide(); mask.hide();
mask.attr('counter', 0); mask.attr('counter', 0);
} }
@ -803,7 +801,7 @@ define([
} }
} }
Common.NotificationCenter.trigger('modal:close', this, hide_mask); Common.NotificationCenter.trigger('modal:close', this, hide_mask && (parseInt(mask.attr('counter'))<1));
} }
this.$window.remove(); this.$window.remove();
@ -826,12 +824,11 @@ define([
if ( hide_mask ) { if ( hide_mask ) {
if (this.options.animate !== false) { if (this.options.animate !== false) {
var opacity = mask.css('opacity');
mask.css(_getTransformation(0)); mask.css(_getTransformation(0));
setTimeout(function () { setTimeout(function () {
mask.css('opacity', opacity);
if (parseInt(mask.attr('counter'))<1) { if (parseInt(mask.attr('counter'))<1) {
mask.css('opacity', '0.2');
mask.hide(); mask.hide();
mask.attr('counter', 0); mask.attr('counter', 0);
} }
@ -843,7 +840,7 @@ define([
} }
} }
} }
Common.NotificationCenter.trigger('modal:hide', this, hide_mask); Common.NotificationCenter.trigger('modal:hide', this, hide_mask && (parseInt(mask.attr('counter'))<1));
} }
this.$window.hide(); this.$window.hide();
this.$window.removeClass('notransform'); this.$window.removeClass('notransform');