Merge pull request #2387 from ONLYOFFICE/feature/fix-bugs

Feature/fix bugs
This commit is contained in:
maxkadushkin
2023-05-15 16:57:16 +03:00
committed by GitHub
2 changed files with 3 additions and 11 deletions

View File

@ -2,13 +2,6 @@ body {
margin: 0;
}
body.theme-type-light {
--background-navbar-ios: #ffffff;
--background-navbar-word: #446995;
--background-navbar-cell: #40865c;
--background-navbar-slide: #aa5252;
}
body.theme-type-dark {
--background-navbar-ios: #232323;
--background-navbar-word: #232323;

View File

@ -27,7 +27,6 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
const docInfo = props.storeDocumentInfo;
const docExt = docInfo.dataDoc ? docInfo.dataDoc.fileType : '';
const docTitle = docInfo.dataDoc ? docInfo.dataDoc.title : '';
const isAvailableExt = docExt && docExt !== 'oform';
useEffect(() => {
Common.Gateway.on('init', loadConfig);
@ -55,7 +54,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
const navbarHeight = navbarBgHeight + subnavbarHeight;
const onEngineCreated = api => {
if(isAvailableExt && isViewer) {
if(isViewer) {
api.SetMobileTopOffset(navbarHeight, navbarHeight);
api.asc_registerCallback('onMobileScrollDelta', scrollHandler);
}
@ -70,14 +69,14 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
return () => {
const api = Common.EditorApi.get();
if (api && isAvailableExt && isViewer) {
if (api && isViewer) {
api.SetMobileTopOffset(navbarHeight, navbarHeight);
api.asc_unregisterCallback('onMobileScrollDelta', scrollHandler);
}
Common.Notifications.off('engineCreated', onEngineCreated);
}
}, [isAvailableExt, isViewer]);
}, [isViewer]);
// Scroll handler