Skip to content

Failing test for #19287 - #21529

Closed
johanrd wants to merge 1 commit into
emberjs:mainfrom
johanrd:todo-test-gh19287
Closed

Failing test for #19287#21529
johanrd wants to merge 1 commit into
emberjs:mainfrom
johanrd:todo-test-gh19287

Conversation

@johanrd

@johanrd johanrd commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Adds a failing test for #19287: disabling a focused element fires blur during render, and a {{on "blur"}} listener that updates rendered state hits the backtracking assertion.

The test is a QUnit todo: CI stays green while the bug exists, and fails once it is fixed (then flip @todo to @test). Adds @todo to moduleFor, mapping to native QUnit.todo like @skip.

Prototype fix: johanrd#36 — defers dynamic attribute updates to transaction commit, so DOM writes that dispatch events synchronously (like disabledblur) run after the render transaction has closed, the same way modifier install/update is already scheduled. With it, this PR's @todo test flips to a passing @test.

A first iteration (johanrd#37) special-cased only disabled, but the attribute layer already has too many per-name special cases (see #21344), and the generic deferral fixes the whole class — any attribute write that can dispatch a synchronous event — instead of one name. It also moves DOM writes out of the tracked computation. Cost: one closure per changed attribute per rerender.

Disabling a focused element fires blur synchronously during render, so a
{{on "blur"}} listener that updates rendered state trips the backtracking
assertion. Recorded as a QUnit todo test (via new @todo support in
moduleFor) so it passes CI while the bug exists and flags when fixed.
@johanrd johanrd changed the title Failing (todo) test for #19287 Failing test for #19287 Jul 27, 2026
@NullVoxPopuli

Copy link
Copy Markdown
Contributor

Blur is a synchronous event, so i think the error gavin ran in to was not a regression, but a bugfix

https://w3c.github.io/uievents/#event-type-blur

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.

2 participants