question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't delete a shape when iframe loses focus

See original GitHub issue

It’s gonna take me some time to make a reproducing example. But maybe you have a quick guess about where the bug is.

The repro is roughly as follows:

  1. Embed <iframe> on the page. The iframe content page renders <Excalidraw />.
  2. Draw a shape
  3. Click outside the iframe.
    • Note the shape still appears selected — Excalidraw doesn’t know you clicked outside the iframe. Not ideal but seems okay — I don’t know if that’s even fixable.
  4. Click on the shape and press Backspace.

Expected: the shape gets deleted. Actual: the shape is undelete-able — it ignores the key bindings.

The only way to fix it from that point is to draw another shape. Somehow after that, selecting the first shape attaches the key bindings again, and I can Backspace the first shape.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gaearoncommented, Mar 16, 2021

Thanks!

1reaction
craigkovatchcommented, Mar 1, 2021

It was introduced very early in the project to prevent UI text selecting on drag.

If that’s the case, you should be able to just use -webkit-user-select: none; user-select: none; and be done! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript - Focus lost and gain on iFrame - Stack Overflow
When a user clicks outside of the website, a blur gets called, and I capture a focus lost event.
Read more >
HTML iframe tabindex Attribute - Dofactory
A tabindex attribute on an <iframe> tag. Place focus on a link inside the frame and tab. Focus will jump to other elements...
Read more >
847763 - Prevent virtual keyboard iframe from getting focus
Agree, especially the keyboard app is developed by 3rd-party. Remove dependency because correct -moz-user-focus behavior won't solve the problem here.
Read more >
Input focus issue inside iframe | Apple Developer Forums
Hi! I currently developing a mobile website and found that Safari on iOS has some problems setting the focus on inputs when they...
Read more >
4 reasons your z-index isn't working (and how to fix it)
Alternative Solution: Remove positioning from the content, so it won't limit the modal's z-index. ... Since the content element is now ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found