Merge pull request #918 from ONLYOFFICE/fix/fix-bugs-on-mobiles

Fix/fix bugs on mobiles
This commit is contained in:
maxkadushkin 2021-06-08 19:51:03 +03:00 committed by GitHub
commit d12011404d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 9 deletions

View file

@ -510,6 +510,10 @@ class MainController extends Component {
} }
bindEvents() { bindEvents() {
$$(window).on('resize', () => {
this.api.Resize();
});
this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this)); this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this));
this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this)); this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this));
this.api.asc_registerCallback('asc_onDocumentName', this.onDocumentName.bind(this)); this.api.asc_registerCallback('asc_onDocumentName', this.onDocumentName.bind(this));

View file

@ -76,7 +76,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview')(prop
{ {
text: _t.leaveButtonText, text: _t.leaveButtonText,
onClick: function() { onClick: function() {
goBack(); goBack(true);
} }
}, },
{ {
@ -86,7 +86,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview')(prop
] ]
}).open(); }).open();
} else { } else {
goBack(); goBack(true);
} }
}; };
const goBack = (current) => { const goBack = (current) => {

View file

@ -293,6 +293,10 @@ class MainController extends Component {
} }
bindEvents () { bindEvents () {
$$(window).on('resize', () => {
this.api.Resize();
});
this.api.asc_registerCallback('asc_onDocumentContentReady', this.onDocumentContentReady.bind(this)); this.api.asc_registerCallback('asc_onDocumentContentReady', this.onDocumentContentReady.bind(this));
this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this)); this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this));
this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this)); this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this));

View file

@ -75,7 +75,7 @@ const ToolbarController = inject('storeAppOptions', 'users')(props => {
{ {
text: _t.leaveButtonText, text: _t.leaveButtonText,
onClick: function() { onClick: function() {
goBack(); goBack(true);
} }
}, },
{ {
@ -85,7 +85,7 @@ const ToolbarController = inject('storeAppOptions', 'users')(props => {
] ]
}).open(); }).open();
} else { } else {
goBack(); goBack(true);
} }
}; };
const goBack = (current) => { const goBack = (current) => {

View file

@ -292,6 +292,10 @@ class MainController extends Component {
} }
bindEvents() { bindEvents() {
$$(window).on('resize', () => {
this.api.asc_Resize();
});
this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this)); this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this));
this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this)); this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this));
this.api.asc_registerCallback('asc_onPrintUrl', this.onPrintUrl.bind(this)); this.api.asc_registerCallback('asc_onPrintUrl', this.onPrintUrl.bind(this));

View file

@ -56,9 +56,10 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(props => {
}, []); }, []);
const onApiActiveSheetChanged = (index) => { const onApiActiveSheetChanged = (index) => {
// console.log(index); if (index < sheets.sheets.length) {
sheets.setActiveWorksheet(index); sheets.setActiveWorksheet(index);
Common.Notifications.trigger('sheet:active', index); Common.Notifications.trigger('sheet:active', index);
}
} }
const onApiHideTabContextMenu = () => { const onApiHideTabContextMenu = () => {

View file

@ -76,7 +76,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
{ {
text: _t.leaveButtonText, text: _t.leaveButtonText,
onClick: function() { onClick: function() {
goBack(); goBack(true);
} }
}, },
{ {
@ -86,7 +86,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
] ]
}).open(); }).open();
} else { } else {
goBack(); goBack(true);
} }
}; };
const goBack = (current) => { const goBack = (current) => {