mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Fix invalid ContextualMenu positions
This commit is contained in:
parent
a5e2877862
commit
8505f292b2
@ -322,10 +322,11 @@ export class ContextMenu extends React.PureComponent<IProps, IState> {
|
|||||||
|
|
||||||
const menuClasses = classNames({
|
const menuClasses = classNames({
|
||||||
'mx_ContextualMenu': true,
|
'mx_ContextualMenu': true,
|
||||||
'mx_ContextualMenu_left': !hasChevron && position.left,
|
// Defensively check for counter cases
|
||||||
'mx_ContextualMenu_right': !hasChevron && position.right,
|
'mx_ContextualMenu_left': !hasChevron && position.left !== undefined && !position.right,
|
||||||
'mx_ContextualMenu_top': !hasChevron && position.top,
|
'mx_ContextualMenu_right': !hasChevron && position.right !== undefined && !position.left,
|
||||||
'mx_ContextualMenu_bottom': !hasChevron && position.bottom,
|
'mx_ContextualMenu_top': !hasChevron && position.top !== undefined && !position.bottom,
|
||||||
|
'mx_ContextualMenu_bottom': !hasChevron && position.bottom !== undefined && !position.top,
|
||||||
'mx_ContextualMenu_withChevron_left': chevronFace === ChevronFace.Left,
|
'mx_ContextualMenu_withChevron_left': chevronFace === ChevronFace.Left,
|
||||||
'mx_ContextualMenu_withChevron_right': chevronFace === ChevronFace.Right,
|
'mx_ContextualMenu_withChevron_right': chevronFace === ChevronFace.Right,
|
||||||
'mx_ContextualMenu_withChevron_top': chevronFace === ChevronFace.Top,
|
'mx_ContextualMenu_withChevron_top': chevronFace === ChevronFace.Top,
|
||||||
|
Loading…
Reference in New Issue
Block a user