Excalidraw component steals focus
See original GitHub issueStandalone Excalidraw component tries to focus itself on page load. This leads to jumps on long pages. This seems like it should be configurable or off for the standalone version.
My temporary workaround:
if (typeof HTMLDivElement !== 'undefined') {
const realFocus = HTMLDivElement.prototype.focus;
HTMLDivElement.prototype.focus = function() {
if (this.className.indexOf('excalidraw-container') === -1) {
realFocus.apply(this, arguments);
}
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Can't delete a shape when iframe loses focus #3151 - GitHub
From what I can see: clicking outside the iframe steals focus from it, and clicking back inside on the ... excalidraw/src/components/App.tsx.
Read more >One Year of Excalidraw - Hacker News
Because it kinda looks like a child's work it takes off the edge of noticing useless details and carries the intent better. The...
Read more >Building a React Application: Part I | by Eric Gibby - Medium
React is a powerful JavaScript library whose primary focus is on rendering fast, performant UIs, using one-way data-binding to populate the ...
Read more >Next.js Conf 2022: React Roundup - Bitovi
Next.js's focus this year on innovating "routing, rendering, ... Excalidraw also included RNG to determine which user takes precedence, ...
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
closed via #3691
Sure go for it @h7y 👍🏻