Skip to content

[BUG] LinkDialog position is offset when the parent was translated with css transform #863

@hugotox

Description

@hugotox
  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
The LinkDialog popup is off when the parent has a css transform to translate it. This is a common pattern in dialogs/drawers like the ones in shadcn.

Reproduction
https://codesandbox.io/p/github/mdx-editor/repro-starter/csb-qspqgf/draft/misty-voice

To Reproduce
Steps to reproduce the behavior:

  1. Make a container element with a transform style to translate the element
  2. Make an instance of the editor inside and enable link dialog
  3. Create a link, observe the link dialog is off

Expected behavior
Link dialog should be in the right position

Screenshots

Image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions