FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Why Do Clicks “Stack Up” When JavaScript Blocks the UI?
How-ToWeb Development

Why Do Clicks “Stack Up” When JavaScript Blocks the UI?

via Dev.to WebdevNoor ul hassan1mo ago

I recently noticed something interesting while experimenting with JavaScript. I wrote a simple synchronous loop that runs for about 10 seconds: const start = Date . now (); while ( Date . now () - start < 10000 ) { // Block for 10 seconds } During those 10 seconds, the UI completely freezes. That part makes sense. But here’s the interesting part: While the loop was running, I kept clicking a button on the page. Nothing happened. No console logs. No UI updates. Then the loop finished… And suddenly, all my clicks fired at once. It felt like the browser had “saved” them somewhere. So what’s actually happening? The Short Answer: OS Input Buffering When JavaScript runs a heavy synchronous task, the main thread (Call Stack) is blocked. But JavaScript freezing does not mean your entire system freezes. Let’s break it down: 1️ Hardware Level When you click your mouse, the hardware sends an interrupt signal to the Operating System. 2️ OS Level The OS records that click in its input buffer. Even

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
25 views

Related Articles

Learning a Recurrent Visual Representation for Image Caption Generation
How-To

Learning a Recurrent Visual Representation for Image Caption Generation

Dev.to • 16h ago

How-To

# 5 JSON Mistakes Developers Make (And How to Fix Them Fast)

Medium Programming • 18h ago

10 subtle go mistakes that only show up in production
How-To

10 subtle go mistakes that only show up in production

Medium Programming • 18h ago

Stop Configuring Third-Party Libraries by Hand — Let Your Agent Handle It!
How-To

Stop Configuring Third-Party Libraries by Hand — Let Your Agent Handle It!

Medium Programming • 18h ago

How-To

How I Stay Consistent While Learning Coding

Medium Programming • 19h ago

Discover More Articles