[DE PE SSE mobile] Blocking keyboard
This commit is contained in:
parent
2b9dce1765
commit
c5e8d84172
|
@ -147,7 +147,11 @@ class CollaborationView extends Component {
|
|||
}
|
||||
|
||||
const Collaboration = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone ) {
|
||||
f7.sheet.open('.coauth__sheet');
|
||||
} else {
|
||||
|
@ -160,7 +164,10 @@ const Collaboration = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed ) props.onclosed();
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -213,7 +213,11 @@ class AddView extends Component {
|
|||
}
|
||||
|
||||
const Add = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.popup.open('.add-popup');
|
||||
else f7.popover.open('#add-popover', '#btn-add');
|
||||
|
@ -225,8 +229,10 @@ const Add = props => {
|
|||
}
|
||||
});
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
return <AddView usePopover={!Device.phone} onclosed={onviewclosed} showPanels={props.showOptions} />
|
||||
};
|
||||
|
|
|
@ -328,7 +328,11 @@ const EditView = props => {
|
|||
};
|
||||
|
||||
const EditOptions = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.sheet.open('#edit-sheet');
|
||||
else f7.popover.open('#edit-popover', '#btn-edit');
|
||||
|
@ -339,8 +343,10 @@ const EditOptions = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -60,6 +60,7 @@ const routes = [
|
|||
const SettingsList = inject("storeAppOptions", "storeReview")(observer(props => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('Settings', {returnObjects: true});
|
||||
const api = Common.EditorApi.get();
|
||||
const storeReview = props.storeReview;
|
||||
const displayMode = storeReview.displayMode;
|
||||
const navbar = <Navbar title={_t.textSettings}>
|
||||
|
@ -72,6 +73,8 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
|||
};
|
||||
|
||||
const closeModal = () => {
|
||||
api.asc_enableKeyEvents(true);
|
||||
|
||||
if (Device.phone) {
|
||||
f7.sheet.close('.settings-popup', false);
|
||||
} else {
|
||||
|
@ -85,6 +88,7 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
// set mode
|
||||
|
|
|
@ -152,7 +152,11 @@ class AddView extends Component {
|
|||
}
|
||||
|
||||
const Add = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.popup.open('.add-popup');
|
||||
else f7.popover.open('#add-popover', '#btn-add');
|
||||
|
@ -162,8 +166,10 @@ const Add = props => {
|
|||
}
|
||||
});
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
return <AddView usePopover={!Device.phone} onclosed={onviewclosed} showPanels={props.showOptions} />
|
||||
};
|
||||
|
|
|
@ -349,7 +349,11 @@ const EditView = props => {
|
|||
};
|
||||
|
||||
const EditOptions = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.sheet.open('#edit-sheet');
|
||||
else f7.popover.open('#edit-popover', '#btn-edit');
|
||||
|
@ -360,8 +364,10 @@ const EditOptions = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -189,7 +189,11 @@ class SettingsView extends Component {
|
|||
}
|
||||
|
||||
const Settings = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.popup.open('.settings-popup');
|
||||
else f7.popover.open('#settings-popover', '#btn-settings');
|
||||
|
@ -199,8 +203,10 @@ const Settings = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if (props.onclosed)
|
||||
if (props.onclosed) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return <SettingsView usePopover={!Device.phone} onclosed={onviewclosed} openOptions={props.openOptions} />
|
||||
|
|
|
@ -193,7 +193,17 @@ class AddView extends Component {
|
|||
}
|
||||
|
||||
const Add = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const seltype = cellinfo.asc_getSelectionType();
|
||||
const iscelllocked = cellinfo.asc_getLocked();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
|
||||
let options;
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone ) {
|
||||
f7.popup.open('.add-popup');
|
||||
} else {
|
||||
|
@ -207,17 +217,12 @@ const Add = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const seltype = cellinfo.asc_getSelectionType();
|
||||
const iscelllocked = cellinfo.asc_getLocked();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
let options;
|
||||
|
||||
if ( !iscelllocked ) {
|
||||
options = props.showOptions;
|
||||
if ( !options ) {
|
||||
|
|
|
@ -430,7 +430,14 @@ const EditView = props => {
|
|||
};
|
||||
|
||||
const EditOptions = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const hyperinfo = cellinfo.asc_getHyperlink();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.sheet.open('#edit-sheet');
|
||||
else f7.popover.open('#edit-popover', '#btn-edit');
|
||||
|
@ -441,15 +448,12 @@ const EditOptions = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const hyperinfo = cellinfo.asc_getHyperlink();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
|
||||
return (
|
||||
<EditView usePopover={!Device.phone} onClosed={onviewclosed} isAddShapeHyperlink={isAddShapeHyperlink} hyperinfo={hyperinfo} wsLock={props.wsLock} wsProps={props.wsProps} />
|
||||
)
|
||||
|
|
|
@ -193,7 +193,11 @@ class SettingsView extends Component {
|
|||
}
|
||||
|
||||
const Settings = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
useEffect(() => {
|
||||
api.asc_enableKeyEvents(false);
|
||||
|
||||
if ( Device.phone )
|
||||
f7.popup.open('.settings-popup');
|
||||
else f7.popover.open('#settings-popover', '#btn-settings');
|
||||
|
@ -204,8 +208,10 @@ const Settings = props => {
|
|||
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return <SettingsView usePopover={!Device.phone} onclosed={onviewclosed} openOptions={props.openOptions} />
|
||||
|
|
Loading…
Reference in a new issue