Skip to content

Fix rerender assertion when focussing certain Glimmer components#234

Merged
aoumiri merged 4 commits intoqonto:masterfrom
nickschot:render-assertion-fix
Nov 15, 2021
Merged

Fix rerender assertion when focussing certain Glimmer components#234
aoumiri merged 4 commits intoqonto:masterfrom
nickschot:render-assertion-fix

Conversation

@nickschot
Copy link
Copy Markdown
Contributor

@nickschot nickschot commented Nov 10, 2021

The rerender assertion would be triggered if we focus on a child where an {{on "focus"}} modifier is present that modifies a tracked variable (see the added test case/minimal reproduction). This is not reproducible with a classic Ember component, hence the added devDependencies for Glimmer components/tracking.

I think it would be good enough to only schedule childElement.focus() on the next runloop rather than both cases, but we might want to keep things consistent, timing wise.

The most notable practical application where the described issue occurs is ember-power-select.

@nickschot nickschot force-pushed the render-assertion-fix branch from e461c19 to 7b8330c Compare November 12, 2021 09:32
@nickschot nickschot force-pushed the render-assertion-fix branch from 7b8330c to cc97af2 Compare November 12, 2021 09:38
@aoumiri
Copy link
Copy Markdown

aoumiri commented Nov 15, 2021

LGTM, thanks for taking the time to do all this work 💪

@aoumiri aoumiri merged commit b7ea5ae into qonto:master Nov 15, 2021
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