Can't delete a shape when iframe loses focus
See original GitHub issueIt’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:
- Embed
<iframe>
on the page. The iframe content page renders<Excalidraw />
. - Draw a shape
- 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.
- 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:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks!
If that’s the case, you should be able to just use
-webkit-user-select: none; user-select: none;
and be done! 😃