Recording drops clicks on links, filters and checkboxes that share a form with a search field

Open Beginner friendly
#657 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@columbia11 is already working on this.

Since Nov 9, 2026.

  • #658 by @columbia11 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Start with apps/extension/src/content/record-capture.ts and read nearbyFillableFromSearchChrome, which the issue identifies as swallowing clicks in containers with search fields. Reproduce with the GOV.UK filter flow described in the issue and check trace.json: clicks on links, disclosures and checkboxes should be recorded while clicks on non-interactive search decoration can still be ignored.

Written by the indexing model from the issue text.

Description

Problem

bsk record drops clicks on real controls when they share a form or search container with a search field. On GOV.UK, the whole result list and filter panel sit inside form#all-content-finder-form, which also holds the search box. As a result, recording a filter flow there produces an empty trace.

Reproduction (real site, installed extension)

Environment:

  • Built from main 9084a36e. The recording code is unchanged at a929080d.
  • Unpacked extension, production bsk CLI and daemon, headed Chrome on Windows 11.
  • Started with bsk record start --url https://www.gov.uk/search/all?keywords=passport and stopped with bsk record stop.
  • Input was trusted CDP mouse events.
Action Page reaction trace.json
Click "Filter and sort" (button), then the "Filter by Type" <summary>, then the "Services" checkbox Panel opens, section expands, checkbox becomes checked: true 0 steps
Click the first search result, "Renew or replace your adult passport" Navigates No click step, only navigate with cause: "link"
Control: click the breadcrumb "Home" link, which is outside the form Navigates click link "Home"
Control: click the same GOV.UK checkbox on design-system.service.gov.uk, which has no search form Checked click checkbox "Waste from animal carcasses"

Cause

nearbyFillableFromSearchChrome (apps/extension/src/content/record-capture.ts) is meant to ignore clicks on search decoration that only focus the input.

It treats any click inside form, [class*="search"], [id*="search"] or [role="search"] as such decoration when that container holds a textarea, input[type="search"] or input[name="q"]. It does this whatever the click target is. The click then becomes ensureFillSession(searchField) and no step is emitted.

Scope

I ran the same rule as an in-page probe on real pages:

  • gov.uk/search: all 19 visible result links, the filter disclosures and the checkboxes are affected.
  • Bing results: 3 elements are affected, including the image search [role=button], labelled "使用图像搜索" in the zh-CN UI.
  • Unaffected: npm, MDN, GitHub search and html.duckduckgo.com.

Relation to #602

Open PR #602 (for #593) exempts button and submit, reset and image inputs from this rule. Links, <summary>, checkboxes, radios and ARIA controls such as [role=button] stay swallowed, so the GOV.UK filter and result clicks above are still lost with #602.

Expected

A click on a real control is recorded as a click even when the control shares a form with a search field. Clicks on non-interactive decoration around the field can still be ignored.

Dominant language
TypeScript
Stars
10.1k
Forks
732
Avg merge
1d 21h
Merged PRs (30d)
97

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tencent/BrowserSkill

All issues in Tencent/BrowserSkill

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.