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

moveable-control-box misplaced when used with SVG foreignObject elements on Safari #1048

Closed
DatLe1108 opened this issue Nov 19, 2023 · 2 comments
Labels
bug Something isn't working complete
Milestone

Comments

@DatLe1108
Copy link

Environments

  • Framework name: reactjs
  • Framework version: 17.0.2
  • Moveable Component version: react-moveable 0.45.1
  • Testable Address(optional): Code Sandbox

Description

Hi, I need to render html elements inside a svg therefore i used foreignObject element. The moveable-control-box is renderer correctly on Chrome but misplaced on Safari.

This is what i tried to do

 <>
      <Moveable target={target} draggable={true} resizable={true} />
      <svg viewBox="0 0 86 54">
        <foreignObject ref={ref} x="10" y="10" width="20" height="20">
          <div>Hi</div>
        </foreignObject>
      </svg>
</>

Below is a screenshot to compare:
Safari
Screenshot 2023-11-19 at 08 35 19

Chrome
Screenshot 2023-11-19 at 08 34 39

@lizaemran
Copy link

I am facing similar issue in Firefox as well

@daybrush daybrush added this to the 0.53.0 milestone Nov 26, 2023
@daybrush daybrush added the bug Something isn't working label Dec 3, 2023
@daybrush
Copy link
Owner

daybrush commented Dec 3, 2023

@lizaemran @DatLe1108

  • croact-moveable 0.9.0
  • @moveable/helper 0.1.3
  • lit-moveable 0.30.0
  • moveable 0.53.0
  • preact-moveable 0.55.0
  • react-moveable 0.56.0
  • svelte-moveable 0.45.0
  • vue-moveable 2.0.0-beta.87
  • vue3-moveable 0.28.0
  • ngx-moveable 0.50.0

moveable's new version is released. Check it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complete
Projects
None yet
Development

No branches or pull requests

3 participants