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.

Handler violations, browser freezes when using Web Components

See original GitHub issue

Describe the bug

I think this is a bug with Kit when using Shoelace web components but I am unsure where this stems from. The issue does not happen when using regular Svelte, even with Svelte REPL I’m unable to reproduce this issue.

I have thoroughly described the issue here https://github.com/shoelace-style/shoelace/issues/466 where the author of the Shoelace web components library replied with some notes.

I am unsure how to debug this. Maybe someone can help? But I can say the issue (handler violations) occur constantly. The browser would freeze for up to 10 seconds with a Verbose console log message like [Violation] 'focusin' handler took 6519ms

Logs No specific logs available, nothing comes up on dev server side

To Reproduce

  1. Clone the repo at https://github.com/brgrz/sl-bugs
  2. Run npm i
  3. Run npm run dev, it will run the SvelteKit app at http://localhost:3000
  4. Open Chrome + devtools, in Devtools->Console tab->select All issues (or Verbose)
  5. Open the app, click the Open drawer button
  6. Inside the drawer try clicking around on the whitespace, try clicking into the input and then onto the whitespace and so forth
  7. You should be seeing instances of [Violation] ‘focusin’ handler took 6519ms in the Console (while this happens, the app will freeze preventing you to click on anything else)

Expected behavior No freezes, no violations/timeouts

Information about your SvelteKit Installation:

System: OS: Windows 10 10.0.19042 CPU: (8) ia32 Intel® Core™ i7-8565U CPU @ 1.80GHz Memory: 5.00 GB / 15.78 GB Binaries: Node: 14.17.0 - C:\Program Files (x86)\nodejs\node.EXE npm: 7.11.2 - C:\Program Files (x86)\nodejs\npm.CMD Browsers: Chrome: 91.0.4472.106 Edge: Spartan (44.19041.1023.0), Chromium (91.0.864.48) Internet Explorer: 11.0.19041.1 npmPackages: @sveltejs/kit: next => 1.0.0-next.113 svelte: ^3.38.2 => 3.38.2

  • Chrome

Severity Quite severe

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
geoffrichcommented, Jun 29, 2021

This was fixed in the Shoelace repo with https://github.com/shoelace-style/shoelace/commit/1c8a3ea7d245c5520567b09e48a6e50ff3315a7e so there isn’t anything for SK to do here. I recommend closing when a maintainer gets around to this.

0reactions
geoffrichcommented, Feb 28, 2022

@brgrz SvelteKit now removes the tabindex after focusing the document root.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome crashes with too many web components
So I create this simple table (6 rows and 25 columns) and I populate cells with these Web Components. If I do this...
Read more >
Handling common accessibility problems - MDN Web Docs
Hopefully this article has given you a good grounding in the main accessibility problems you might encounter, and how to test and overcome ......
Read more >
Handle errors in ASP.NET Core Blazor apps - Microsoft Learn
Discover how ASP.NET Core Blazor manages unhandled exceptions and how to develop apps that detect and handle errors.
Read more >
10 types of security incidents and how to handle them
Drive-by downloads, which take advantage of vulnerabilities in web browsers, inject malicious code using JavaScript and other browsing features.
Read more >
Content Security Policy Level 3 - W3C
This document was published by the Web Application Security ... of an inline script, event handler, or style that caused an violation.
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