You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-08 17:48:33 +03:00
Fix edge case in context menu chevron positioning (#7899)
* Fix edge case in context menu chevron positioning Signed-off-by: Robin Townsend <robin@robin.town> * Expand context menu positioning regression tests Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
@@ -271,7 +271,7 @@ export default class ContextMenu extends React.PureComponent<IProps, IState> {
|
||||
windowHeight - contextMenuRect.height - WINDOW_PADDING,
|
||||
);
|
||||
if (chevronOffset.top !== undefined) {
|
||||
chevronOffset.top = props.chevronOffset + props.bottom - position.bottom;
|
||||
chevronOffset.top = props.chevronOffset + position.bottom - props.bottom;
|
||||
}
|
||||
}
|
||||
if (position.left !== undefined) {
|
||||
@@ -288,7 +288,7 @@ export default class ContextMenu extends React.PureComponent<IProps, IState> {
|
||||
windowWidth - contextMenuRect.width - WINDOW_PADDING,
|
||||
);
|
||||
if (chevronOffset.left !== undefined) {
|
||||
chevronOffset.left = props.chevronOffset + props.right - position.right;
|
||||
chevronOffset.left = props.chevronOffset + position.right - props.right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user