fix: Cannot access menu on threaded comments, closes #4983
This commit is contained in:
@@ -141,8 +141,14 @@ function usePosition({
|
||||
// instances leave a margin
|
||||
const margin = 12;
|
||||
const left = Math.min(
|
||||
offsetParent.x + offsetParent.width - menuWidth - margin,
|
||||
Math.max(offsetParent.x + margin, centerOfSelection - menuWidth / 2)
|
||||
Math.min(
|
||||
offsetParent.x + offsetParent.width - menuWidth,
|
||||
window.innerWidth - margin
|
||||
),
|
||||
Math.max(
|
||||
Math.max(offsetParent.x, margin),
|
||||
centerOfSelection - menuWidth / 2
|
||||
)
|
||||
);
|
||||
const top = Math.min(
|
||||
window.innerHeight - menuHeight - margin,
|
||||
|
||||
@@ -243,6 +243,7 @@ export const Bubble = styled(Flex)<{
|
||||
$focused?: boolean;
|
||||
$dir?: "rtl" | "ltr";
|
||||
}>`
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
font-size: 15px;
|
||||
color: ${(props) => props.theme.text};
|
||||
|
||||
Reference in New Issue
Block a user