Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: In storybook, DraggableBlockPlugin does not work #6818

Closed
lin-mt opened this issue Nov 12, 2024 · 1 comment · Fixed by #6915
Closed

Bug: In storybook, DraggableBlockPlugin does not work #6818

lin-mt opened this issue Nov 12, 2024 · 1 comment · Fixed by #6915

Comments

@lin-mt
Copy link
Contributor

lin-mt commented Nov 12, 2024

Lexical version: 0.20.0

Steps To Reproduce

Most of the code is copied from Lexical Playground.

  1. git clone https://github.com/lin-mt/quiet-lexical/tree/tag/draggable-blok-not-working
  2. npm install
  3. npm run storybook
  4. 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);

image

The expected behavior

In Vite, the same code, DraggableBlockPlugin is effective and can be used normally.

  1. git clone https://github.com/lin-mt/lexical-test
  2. npm install
  3. npm run dev
image

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.

@etrepum
Copy link
Collaborator

etrepum commented Nov 12, 2024

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.

lin-mt added a commit to lin-mt/lexical that referenced this issue Dec 6, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 10, 2024
…e calculated #6818 (#6915)

Co-authored-by: Bob Ippolito <bob@redivi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants