Fix document title on loading

This commit is contained in:
Julia Radzhabova 2022-09-16 17:24:27 +03:00
parent 5f95f0facc
commit 98400da2e2

View file

@ -543,7 +543,7 @@ define([
if ( !$labelDocName ) { if ( !$labelDocName ) {
$labelDocName = $html.find('#rib-doc-name'); $labelDocName = $html.find('#rib-doc-name');
if ( me.documentCaption ) { if ( me.documentCaption ) {
me.setDocTitle(me.documentCaption); setTimeout(function() { me.setDocTitle(me.documentCaption); }, 50);
} }
} else { } else {
$html.find('#rib-doc-name').hide(); $html.find('#rib-doc-name').hide();
@ -621,7 +621,7 @@ define([
!!$labelDocName && $labelDocName.hide().off(); // hide document title if it was created in right box !!$labelDocName && $labelDocName.hide().off(); // hide document title if it was created in right box
$labelDocName = $html.find('#title-doc-name'); $labelDocName = $html.find('#title-doc-name');
me.setDocTitle( me.documentCaption ); setTimeout(function() { me.setDocTitle(me.documentCaption); }, 50);
me.options.wopi && $labelDocName.attr('maxlength', me.options.wopi.FileNameMaxLength); me.options.wopi && $labelDocName.attr('maxlength', me.options.wopi.FileNameMaxLength);