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

Sometimes shape can't be deleted by pressing Del key #763

Open
lisupeng opened this issue May 16, 2022 · 8 comments
Open

Sometimes shape can't be deleted by pressing Del key #763

lisupeng opened this issue May 16, 2022 · 8 comments

Comments

@lisupeng
Copy link

I used svgedit in tsailun project: https://github.com/lisupeng/tsailun

Sometimes shape can't be deleted by pressing Del key

@jfhenon
Copy link
Collaborator

jfhenon commented May 16, 2022

Hello, thank you for the report but please provide a way to reproduce the issue .

@lisupeng
Copy link
Author

Thanks help look into this issue.
I captured a video: https://youtu.be/kMwuESpa7nI
Reproduce steps:

  1. Create a shape
  2. Open the svg again and select the shape.
  3. The shape can't be deleted by pressing key

@jfhenon
Copy link
Collaborator

jfhenon commented May 29, 2022

I can't reproduce using V7. Please reproducing using https://svgedit.netlify.app/editor/index.html

@lisupeng
Copy link
Author

Thanks for your help!

This happens when I use svgedit in iframe and focus isn't on iframe by default.
Clicking a svg shape doesn't change focus either.

This issue can be fixed by calling window.focus() in svgedit init().

@lisupeng
Copy link
Author

Focus will be changed to svgedit after clicking svgedit's toobar. So sometime it works.

@jfhenon
Copy link
Collaborator

jfhenon commented Jun 18, 2022

Thanks for your help!

This happens when I use svgedit in iframe and focus isn't on iframe by default. Clicking a svg shape doesn't change focus either.

This issue can be fixed by calling window.focus() in svgedit init().

Could you provide a PR to fix the issue?

@lisupeng
Copy link
Author

Since there's only one line code change, can anyone help piggyback the code ?

@jfhenon
Copy link
Collaborator

jfhenon commented Jul 12, 2022

I would be please to help but can you detail exactly what needs to be modified.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants