Bug: In storybook, DraggableBlockPlugin does not work
Lexical version: 0.20.0
Steps To Reproduce
Most of the code is copied from Lexical Playground.
git clone https://github.com/lin-mt/quiet-lexical/tree/tag/draggable-blok-not-workingnpm installnpm run storybook- open http://localhost:6006/?path=/story/docs-quietlexical--default
Link to code example:
https://github.com/lin-mt/quiet-lexical/tree/tag/draggable-blok-not-working
The current behavior
transform is always translate(-10000px, -10000px);
The expected behavior
In Vite, the same code, DraggableBlockPlugin is effective and can be used normally.
git clone https://github.com/lin-mt/lexical-testnpm installnpm run dev
Impact of fix
This issue is 100% reproducible, but I'm not sure if it's a storybook issue or a lexical issue, so I also tried it on dumi, and the problem still exists.
This issue has been fixed. If this issue is a lexical issue, any user who uses lexical to build components in storybook will benefit from it.
I would guess that this has something to do with lexical's floating menu code, there have historically been a lot of bugs in there especially when there's a container that has any sort of zoom or non-default positioning (e.g. scroll) that would interfere with calculations that just don't take everything into account.