Closed nickreynolds closed 1 week ago
crepe
No response
highlight text near the edge of a crepe editor and notice the toolbar is partially cut-off
this is visible on the current Playground deployed to the Milkdown site (reduce width of browser window so text extends near edge of window)
toolbar should adjust position so that entire toolbar is visible
toolbar is centered over highlighted text and so can go off the edge (and be cut-off)
Firefox
macOS
Hi,
The same thing happens in the linkTooltip plugin, as can be seen in this screenshot.
I think adding the same change in this line is enough (add a shift()).
https://github.com/Milkdown/milkdown/blob/7892c6e7eede249ab6db26f020cf2f49e498e3e7/packages/plugins/plugin-tooltip/src/tooltip-provider.ts#L140
@quank123wip
Thanks you
Initial checklist
Affected packages and versions
crepe
Link to runnable example
No response
Steps to reproduce
highlight text near the edge of a crepe editor and notice the toolbar is partially cut-off
this is visible on the current Playground deployed to the Milkdown site (reduce width of browser window so text extends near edge of window)
Expected behavior
toolbar should adjust position so that entire toolbar is visible
Actual behavior
toolbar is centered over highlighted text and so can go off the edge (and be cut-off)
Runtime
Firefox
OS
macOS
Build and bundle tools
No response