Client element claims fire before dynamic attributes are applied, and only `href`/`action` writes re-claim
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 24/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start with the claim ordering in packages/compiler/tests/fixtures/dom-source-names/bindings/output.js, where _$claimElement runs before _$spread sets href and title, then read setAttribute in packages/web/src/client.ts for the claimed-attribute check. The issue offers two fixes, claiming after initial bindings or re-claiming on target, rel, download and similar writes, and a maintainer has to pick one first. Done means a claim consumer sees final initial attributes and is notified of later changes, with the compiler fixture updated to match.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Compiled DOM output calls claimElement(node) at element creation for a[href] / form[action] so consumers (e.g. @solidjs/router link state) can manage navigation-relevant elements. Related: #3878 (server-side claim hole).
Problem
The claim fires before the element's dynamic attribute bindings are first applied — see packages/compiler/__tests__/fixtures/dom-source-names/bindings/output.js, where _$claimElement(_el$22) precedes the _$spread(_el$22, …) that sets href/title. Afterwards, setAttribute in packages/web/src/client.ts re-claims only on href/action writes (including via spread, which routes through assignProp → setAttribute). So a consumer sees the anchor without its final attributes and is never told when they arrive. Writes to target, rel, download, link (router's opt-in attribute), prop:href (property path) and xlink:href (setAttributeNS) don't re-claim.
Consequence (router)
<a href="/x" target={t()}>, download={…}, rel={…} get link state (aria-current / data-active) and interception treatment as if those attributes were absent — on initial mount and late mounts (<Show>) — until the next navigation. The router currently compensates by re-processing every anchor in its location-change sweep, including newly mounted anchors a second time in the same navigation, purely to correct claim timing.
Proposal (either)
- (a) Claim after the element's initial attribute bindings are applied, so the claim sees final initial attributes.
- (b) Also re-claim on writes to
target,rel,download(ideally a consumer-declared set, e.g.link).
(a) fixes mount; (b) also covers later toggles. Server side has no ordering problem since SSR emits all attributes together.
Cost
None without a registered claim consumer (claims are dormant null checks); for (b), a few extra name comparisons in setAttribute's claimed-attribute check.
- Ngôn ngữ chính
- TypeScript
- Star
- 36.1k
- Fork
- 1.1k
- Merge trung bình
- 11 giờ 37 phút
- Pull request đã merge (30 ngày)
- 344
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/solid
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14Có thể đã có người làm @itisrmk đã nhận 2 ngày trước. Đang mở1.x
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 51/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0 / next] Recovering before a held error commits throws the successful valueCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0 / next] A direct write does not clear a writable memo's previous errorCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`createRoot`'s dispose function keeps `fn` alive, so `<For>`/`<Index>` rows retain removed list itemsCó thể đã có người làm @boombang đã nhận 4 ngày trước. Đang mở1.x
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/solid
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
simkimsia/netlify-axi#19 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
subhranshudash13-dotcom/Contribo#74 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement frontend good first issue Stellar Wave trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Godgift-care/sci-healthcare-frontend#166 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend good first issue security Stellar Wave trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Godgift-care/sci-healthcare-backend#171 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày