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

Using the movable style in iframe will be inserted externally #932

Closed
zlyyyy opened this issue May 29, 2023 · 7 comments
Closed

Using the movable style in iframe will be inserted externally #932

zlyyyy opened this issue May 29, 2023 · 7 comments
Labels
bug Something isn't working complete
Milestone

Comments

@zlyyyy
Copy link

zlyyyy commented May 29, 2023

Environments

  • Framework name: movable
  • Framework version: 0.47.9
  • Moveable Component version:
  • Testable Address(optional):

Description

I want to implement drag and drop of sub elements within the iframe, but I found that styles are inserted outside the iframe, resulting in ineffective styles

@daybrush daybrush added the bug Something isn't working label May 29, 2023
daybrush added a commit that referenced this issue May 29, 2023
@daybrush
Copy link
Owner

@zlyyyy

okay, i'll fix it soon.

@jadiagaurang
Copy link

@daybrush I probably will have to use iFrame for my implementation. Will you be able to give us a CodePen Example after the fix?

@daybrush
Copy link
Owner

@jadiagaurang

I'll let you know after fix.

My predictions are:

const iframeDocument = document.querySelector("iframe").contentDocument;
const container = iframeDocument.querySelector(".container");

const moveable = new Moveable(container, {
});

@zlyyyy
Copy link
Author

zlyyyy commented May 29, 2023

@daybrush The internal iframe uses the selectEnd event of selectoRef to set the moveableRef. target. Dragging will cause it to stutter, making it easy to watch together

@daybrush daybrush added this to the 0.48.0 milestone May 31, 2023
daybrush added a commit that referenced this issue Jun 2, 2023
daybrush added a commit that referenced this issue Jun 2, 2023
daybrush added a commit that referenced this issue Jun 4, 2023
@daybrush
Copy link
Owner

daybrush commented Jun 4, 2023

@zlyyyy @jadiagaurang

  • croact-moveable 0.4.0
  • @moveable/helper 0.1.2
  • lit-moveable 0.25.0
  • moveable 0.48.0
  • preact-moveable 0.50.0
  • react-moveable 0.51.0
  • svelte-moveable 0.40.0
  • vue-moveable 2.0.0-beta.76
  • vue3-moveable 0.23.0
  • ngx-moveable 0.45.0

moveable's new version is released. Try it. ([email protected])

iframe example: https://codepen.io/daybrush/pen/BaGBKzK

@zlyyyy
Copy link
Author

zlyyyy commented Jun 4, 2023

@zlyyyy @jadiagaurang

  • croact-moveable 0.4.0

  • @moveable/helper 0.1.2

  • lit-moveable 0.25.0

  • moveable 0.48.0

  • preact-moveable 0.50.0

  • react-moveable 0.51.0

  • svelte-moveable 0.40.0

  • vue-moveable 2.0.0-beta.76

  • vue3-moveable 0.23.0

  • ngx-moveable 0.45.0

moveable's new version is released. Try it. ([email protected])

iframe example: https://codepen.io/daybrush/pen/BaGBKzK

So awesome! ! I'll try it later

@zlyyyy
Copy link
Author

zlyyyy commented Jun 5, 2023

Tested without problems. Thanks again to the author @daybrush

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