Merge pull request #1567 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2022-02-15 13:59:07 +03:00 committed by GitHub
commit 6320fc1aae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 3 deletions

View file

@ -971,6 +971,25 @@
return params; return params;
} }
function getFrameTitle(config) {
var title = 'Powerful online editor for text documents, spreadsheets, and presentations';
var appMap = {
'text': 'text documents',
'spreadsheet': 'spreadsheets',
'presentation': 'presentations',
'word': 'text documents',
'cell': 'spreadsheets',
'slide': 'presentations'
};
if (typeof config.documentType === 'string') {
var app = appMap[config.documentType.toLowerCase()];
if (app)
title = 'Powerful online editor for ' + app;
}
return title;
}
function createIframe(config) { function createIframe(config) {
var iframe = document.createElement("iframe"); var iframe = document.createElement("iframe");
@ -980,6 +999,7 @@
iframe.align = "top"; iframe.align = "top";
iframe.frameBorder = 0; iframe.frameBorder = 0;
iframe.name = "frameEditor"; iframe.name = "frameEditor";
iframe.title = getFrameTitle(config);
iframe.allowFullscreen = true; iframe.allowFullscreen = true;
iframe.setAttribute("allowfullscreen",""); // for IE11 iframe.setAttribute("allowfullscreen",""); // for IE11
iframe.setAttribute("onmousewheel",""); // for Safari on Mac iframe.setAttribute("onmousewheel",""); // for Safari on Mac

View file

@ -352,7 +352,7 @@ define([
restoreHeight: 652, restoreHeight: 652,
textRecentlyUsed: me.textRecentlyUsed, textRecentlyUsed: me.textRecentlyUsed,
recentShapes: recents ? JSON.parse(recents) : null, recentShapes: recents ? JSON.parse(recents) : null,
isFromImage: true hideTextRect: true
}); });
shapePicker.on('item:click', function(picker, item, record, e) { shapePicker.on('item:click', function(picker, item, record, e) {
if (me.api) { if (me.api) {

View file

@ -298,7 +298,7 @@ define([
restoreHeight: 652, restoreHeight: 652,
textRecentlyUsed: me.textRecentlyUsed, textRecentlyUsed: me.textRecentlyUsed,
recentShapes: recents ? JSON.parse(recents) : null, recentShapes: recents ? JSON.parse(recents) : null,
isFromImage: true hideTextRect: true
}); });
shapePicker.on('item:click', function(picker, item, record, e) { shapePicker.on('item:click', function(picker, item, record, e) {
if (me.api) { if (me.api) {

View file

@ -388,7 +388,7 @@ define([
restoreHeight: 652, restoreHeight: 652,
textRecentlyUsed: me.textRecentlyUsed, textRecentlyUsed: me.textRecentlyUsed,
recentShapes: recents ? JSON.parse(recents) : null, recentShapes: recents ? JSON.parse(recents) : null,
isFromImage: true hideTextRect: true
}); });
shapePicker.on('item:click', function(picker, item, record, e) { shapePicker.on('item:click', function(picker, item, record, e) {
if (me.api) { if (me.api) {