fix(mobile): popover handle

This commit is contained in:
DarkSky
2026-07-26 20:57:00 +08:00
parent 749f1c5f0b
commit b05f165820
2 changed files with 12 additions and 1 deletions
@@ -169,7 +169,7 @@ export function createButtonPopper(options: ButtonPopperOptions) {
hide,
toggle,
dispose: () => {
cleanup?.();
hide();
clickAway.dispose();
},
};
+11
View File
@@ -256,6 +256,17 @@ test('should format quick bar be able to change background color', async ({
.evaluate(menu => menu.matches(':popover-open'))
).toBe(true);
const highlightMenu = formatBar.locator(
'affine-highlight-dropdown-menu editor-menu-button'
);
await highlightMenu.evaluate(menu => {
Reflect.set(menu, 'popperOptions', { mainAxis: 1 });
});
await expect(highlightMenu).not.toHaveAttribute('data-open', 'true');
await highlight.highlightBtn.click();
await expect(highlight.redForegroundBtn).toBeVisible();
// TODO(@fundon): these recent settings should be added to the dropdown menu.
// await expect(highlight.highlightBtn).toHaveAttribute(
// 'data-last-used',