fix(editor): improve menu content UX on toolbar (#11491)

* Added scrollbar style

![Screenshot 2025-04-07 at 11.50.19.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/c2a44dcc-7f24-44d5-a855-e2c1671e85f9.png)

* Used `padding` instead of `offset`
This commit is contained in:
fundon
2025-04-07 06:30:06 +00:00
parent 92240fc1a2
commit eb0bcd9b99
2 changed files with 16 additions and 14 deletions

View File

@@ -42,7 +42,6 @@ export type ButtonPopperOptions = {
crossAxis?: number;
allowedPlacements?: Placement[];
rootBoundary?: Rect | (() => Rect | undefined);
ignoreShift?: boolean;
offsetHeight?: number;
};
/**
@@ -68,7 +67,6 @@ export function createButtonPopper(options: ButtonPopperOptions) {
crossAxis,
allowedPlacements = ['top', 'bottom'],
rootBoundary,
ignoreShift,
offsetHeight,
} = options;
@@ -102,11 +100,7 @@ export function createButtonPopper(options: ButtonPopperOptions) {
}),
],
})
.then(({ x, y, middlewareData: data }) => {
if (!ignoreShift) {
x += data.shift?.x ?? 0;
y += data.shift?.y ?? 0;
}
.then(({ x, y }) => {
Object.assign(popperElement.style, {
position: 'absolute',
zIndex: 1,