[DE PE mobile] Fix Bug 51538

This commit is contained in:
SergeyEzhin 2021-08-05 17:56:34 +03:00
parent a23e816aa4
commit c532f574c7
3 changed files with 11 additions and 9 deletions

View file

@ -126,11 +126,13 @@ class ContextMenuController extends Component {
onApiHideContextMenu() {
if ( this.state.opened ) {
$$(idContextMenuElement).hide();
f7.popover.close(idContextMenuElement, false);
this.$targetEl.css({left: '-10000px', top: '-10000px'});
this.setState({opened: false});
setTimeout(() => {
$$(idContextMenuElement).hide();
f7.popover.close(idContextMenuElement, false);
this.$targetEl.css({left: '-10000px', top: '-10000px'});
this.setState({opened: false});
}, 800);
}
}
@ -150,8 +152,8 @@ class ContextMenuController extends Component {
this.setState({openedMore: false});
}
onMenuItemClick(action) {
this.onApiHideContextMenu();
async onMenuItemClick(action) {
await this.onApiHideContextMenu();
if (action === 'showActionSheet') {
this.setState({openedMore: true});

View file

@ -26,7 +26,7 @@ class MainPage extends Component {
}
handleClickToOpenOptions = (opts, showOpts) => {
ContextMenu.closeContextMenu();
f7.popover.close('.document-menu.modal-in', false);
setTimeout(() => {
let opened = false;

View file

@ -28,7 +28,7 @@ class MainPage extends Component {
}
handleClickToOpenOptions = (opts, showOpts) => {
ContextMenu.closeContextMenu();
f7.popover.close('.document-menu.modal-in', false);
setTimeout(() => {
let opened = false;