Skip to content

[Bug] Internal inputs (link edit, image caption) lack id/name attributes, triggering Chrome DevTools issue #2416

Description

@alshil3760

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected packages and versions

@milkdown/crepe 7.21.3

Link to runnable example

No response

Steps to reproduce

  1. Mount a Crepe editor with default features in any host app.
  2. Open Chrome DevTools on the page.
  3. Check the Issues panel.

Expected behavior

Crepe's internal input elements carry an id or name attribute, so host pages pass Chrome's form-field audit.

Actual behavior

Chrome DevTools reports "A form field element should have an id or name attribute". The violating node is the link-edit input (class "input-area", placeholder "Paste link..."), created at editor startup without id or name. The image caption input (class "caption-input") has the same gap. As a workaround we stamp attributes onto these inputs via a MutationObserver in the host app.

Runtime

Chrome

OS

Windows

Build and bundle tools

esbuild

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions