mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 21:01:03 +08:00
fix/bug-arrow-of-empty-contextmenu (#958)
Co-authored-by: Polina <polina.hudyakova@onlyoffice.com> Co-committed-by: Polina <polina.hudyakova@onlyoffice.com>
This commit is contained in:
@ -107,12 +107,11 @@ class ContextMenuController extends Component {
|
||||
const subNav = document.querySelector('.subnavbar');
|
||||
const rect = subNav.getBoundingClientRect();
|
||||
|
||||
this.setState({
|
||||
items: this.initMenuItems(),
|
||||
extraItems: this.initExtraItems()
|
||||
});
|
||||
const items = this.initMenuItems();
|
||||
const extraItems = this.initExtraItems();
|
||||
this.setState({ items, extraItems });
|
||||
|
||||
if ( this.state.items.length > 0 ) {
|
||||
if ( items.length > 0 ) {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
this.$targetEl.css({left: `${x}px`, top: y < rect.bottom ? `${rect.bottom}px` : `${y}px`});
|
||||
|
||||
@ -21,6 +21,7 @@ class ContextMenuView extends Component {
|
||||
return (
|
||||
<Popover id={idContextMenuElement}
|
||||
className="document-menu"
|
||||
arrow={false}
|
||||
backdrop={false}
|
||||
closeByBackdropClick={false}
|
||||
closeByOutsideClick={false}
|
||||
|
||||
Reference in New Issue
Block a user