Skip to content

fix(extension): fill contenteditable descendants - #301

Open
kevin9327 wants to merge 1 commit into
Tencent:mainfrom
kevin9327:fix/fill-contenteditable-descendants
Open

kevin9327 wants to merge 1 commit into
Tencent:mainfrom
kevin9327:fix/fill-contenteditable-descendants

Conversation

@kevin9327

Copy link
Copy Markdown

Problem

bsk fill rejected a <p> (or other inner block) inside a contenteditable editor with target_not_fillable.

DOM.describeNode only reports the target's own attributes. Snapshot refs for TipTap, ProseMirror, Notion-style editors point at the inner paragraph, which has no contenteditable attribute even though element.isContentEditable is true. Fill never reached the live editability check.

Change

Treat unknown tags as maybe-fillable so the live isContentEditable check can accept inherited editability. Keep rejecting controls that fill cannot drive (button, select, media, and similar).

Testing

  • pnpm --filter @browser-skill/extension exec vitest run src/tools/__tests__/fill.test.ts -t contenteditable
  • pnpm --filter @browser-skill/extension test

AI-assisted (Grok)

DOM.describeNode only reports the target's own attributes. A paragraph
inside [contenteditable] has none, so fill rejected it before the live
isContentEditable check. Agents snapshot the inner block of rich
editors and then cannot type into it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant