Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why Your CDP Clicks Silently Fail: Smooth Scroll, Minimised Windows, and JS-Dispatched Events

Originally published on my blog — read it there with the full context, code and updates . If you drive a web app with the Chrome DevTools Protocol, you have met this failure: your script reports clicked @591,361 , the element is there, the click landed — and nothing happens. No exception, no console error, no change on the page. I spent an evening on exactly this while automating a marketplace's…

When automating web applications using the Chrome DevTools Protocol, you may encounter silent failures where clicks appear to be registered, but nothing happens on the page. This issue can stem from three main causes: stale rectangles due to smooth scrolling, minimised windows causing coordinate clicks to be dropped, and the page rejecting the click event.

Cause 1 involves stale rectangles caused by smooth scrolling. When a page scrolls smoothly, the rect returned by getBoundingClientRect() may not reflect the element's actual position. Consequently, clicking the coordinates of the rect lands on whatever is underneath the element, resulting in a seemingly successful click with no visible change on the page. To fix this, scroll into view should be performed with behavior: instant, and the rect should be read after a brief wait to ensure the element's new position is captured.

Cause 2 is related to minimised windows, where clicks dispatched to a hidden or inactive tab may be dropped. In such cases, window.mouse events might not trigger the intended click behaviour. Two fixes are provided: bringing the tab to the front of its window using Page.bringToFront and using a JS-dispatched click event, which bypasses the window's visibility and works reliably, even in custom controls. However, note that event dispatching skips hit-testing, which could lead to unintended clicks on unreachable elements.

Cause 3 involves the page rejecting the click event after the click has been registered and executed. This can be a tricky issue to diagnose, as there would be no error message or console warning. To detect this problem, an event listener should be injected to track all clicks, and a comparison should be made between the recorded events and the actual application response.

If the event buffer is filled up but no action occurs in the application, it suggests the click was successful, but the app itself is rejecting it—possibly due to custom business logic or form validation rules.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Hy Memory 2.0: Tencent's Open-Source Model That Only Remembers

AI agents forget. Close the session and your preferences, project setup and half your instructions are gone. Tencent's answer, released on 15 October 2026, is not a bigger model — it's a specialist…

  • Tencent released Hy Memory 2.0 on 15 October 2026
  • Model focuses solely on managing AI agent memory
  • Three-layer solution includes chat, working, and coding memory

How to Get a Transcript of Any YouTube Video (4 Free Methods)

Sometimes you don't want to watch a video, you want to read it. Maybe you need to quote a conference talk accurately, skim a 90-minute lecture for the one part that matters, or paste a tutorial's…

  • YouTube offers built-in transcript panel for desktop users to view timestamped lines
  • Free web tool YouTubeScribe provides downloadable TXT or SRT transcripts from public videos
  • Video owners can download caption files from YouTube Studio for editing and repurposing

Hold Back to the Last Good Check: Modelling Metal Detector Tests, Sieve Checks and Foreign Body Holds in a Food ERP

By Isaac Muthui, CEO, Tamalaki Business Network Ltd. Originally published at factoraerp.com . A metal detector on a food packing line is a sensor with a pass/fail output.

  • Metal detectors on food packing lines act as sensors with pass/fail outputs.
  • Last good check per control point identified to determine blast radius.
  • Failed checks trigger non-conformance records, QA hold status, and destruction.

More from Friday 23 October →