Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LostFocusController doesn't work when used for elements inside a <lit-virtualizer> #1155

Closed
pdesoyres-cc opened this issue Sep 19, 2024 · 0 comments · Fixed by #1178 or #1234
Closed
Assignees
Labels
enhancement New feature or request

Comments

@pdesoyres-cc
Copy link
Contributor

pdesoyres-cc commented Sep 19, 2024

The controller waits for the next update before calling the callback which is great.
But when elements are in a lit-virtualizer we need to wait a bit more.

A <lit-virtualizer> has a different rendering lifecycle. It has got an additional step which is the layout step: it is used to place the elements at the right position, depending on the scroll position.

So, in that situation, the LostFocusController needs to wait for that step to be finished before calling the callback.

@pdesoyres-cc pdesoyres-cc self-assigned this Sep 19, 2024
@pdesoyres-cc pdesoyres-cc added the enhancement New feature or request label Sep 19, 2024
@roberttran-cc roberttran-cc changed the title LostFocusController doesn't work when used for elements inside a <lit-vritualizer> LostFocusController doesn't work when used for elements inside a <lit-virtualizer> Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant