Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/documenteditor/mobile/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
width: 24px;
height: 24px;
fill: var(--skl-toolbar-icons);
}</style><script defer="defer" src="dist/js/app.js"></script><link href="css/app.9c160f9d9d045320aaa4.css" rel="stylesheet"></head><body><script>window.Common = {Locale: {defaultLang: "en"}};</script><script>window.asceditor = 'word';
}</style><script defer="defer" src="dist/js/app.js"></script><link href="css/app.4f55353d1ddb632ad4eb.css" rel="stylesheet"></head><body><script>window.Common = {Locale: {defaultLang: "en"}};</script><script>window.asceditor = 'word';

const load_stylesheet = reflink => {
let link = document.createElement( "link" );
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/mobile/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ window.$ = jQuery;
// Import Icons and App Custom Styles
// import '../css/icons.css';
import '../../../common/mobile/resources/less/icons-preload.less';
import('./less/app.less');
import './less/app.less';

// Import App Component

Expand Down
9 changes: 9 additions & 0 deletions apps/documenteditor/mobile/src/controller/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
const docExt = storeDocumentInfo.dataDoc ? storeDocumentInfo.dataDoc.fileType : '';
const docTitle = storeDocumentInfo.dataDoc ? storeDocumentInfo.dataDoc.title : '';
const scrollOffsetRef = useRef(0);
const userHasScrolled = useRef(false);

const getNavbarTotalHeight = useCallback(() => {
const navbarBg = document.querySelector('.navbar-bg');
Expand Down Expand Up @@ -99,6 +100,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto

window.addEventListener('touchstart', resetOffset);
window.addEventListener('mousedown', resetOffset);
window.addEventListener('touchstart', () => { userHasScrolled.current = true; }, { once: true });

return () => {
window.removeEventListener('touchstart', resetOffset);
Expand All @@ -109,6 +111,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
// Scroll handler

const scrollHandler = offset => {
if (!userHasScrolled.current) return;
const api = Common.EditorApi.get();
const navbarHeight = getNavbarTotalHeight();
const isSearchbarEnabled = document.querySelector('.subnavbar .searchbar')?.classList.contains('searchbar-enabled');
Expand Down Expand Up @@ -232,6 +235,12 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
appOptions.changeViewerMode(true);
api.asc_addRestriction(Asc.c_oAscRestrictionType.View);
Common.Notifications.trigger('draw:stop');

// Disable the iOS keyboard overlay — mirrors showKeyboard() in turnOffViewerMode.
// Use AscBrowser.isSafariMobile (not Device.ios) — Device is minified in the bundle.
if (window.AscCommon && window.AscCommon.AscBrowser && window.AscCommon.AscBrowser.isSafariMobile && window.AscCommon.g_inputContext) {
window.AscCommon.g_inputContext.preventVirtualKeyboard_Hard();
}
}

const changeMobileView = () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/documenteditor/mobile/src/less/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@
}
}

// FAB
.fab {
// FAB — z-index must beat framework7.css (.fab z-index:1500) which loads after app.css
.page .fab {
z-index: 10000;
a {
background-color: @background-primary;
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/mobile/src/page/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ const MainPage = inject('storeDocumentInfo', 'users', 'storeAppOptions', 'storeV
</div>
</CSSTransition>
}
{appOptions.isDocReady &&
{appOptions.isDocReady &&
<ContextMenu openOptions={handleClickToOpenOptions} />
}
</Page>
Expand Down
Loading