Skip to content

perf(ot-dropdown): eliminate layout thrashing in popover positioning#125

Open
akilvishnum wants to merge 5 commits intoknadh:masterfrom
akilvishnum:master
Open

perf(ot-dropdown): eliminate layout thrashing in popover positioning#125
akilvishnum wants to merge 5 commits intoknadh:masterfrom
akilvishnum:master

Conversation

@akilvishnum
Copy link

Issue: #124

Declarative CSS APIs are used to replace layout thrashing code and reduce JS footprint.

@knadh
Copy link
Owner

knadh commented Mar 4, 2026

This completely breaks dropdowns on Firefox, unfortunately. The JS positioning code is there a temporary hack to make it work on all browsers until popover anchor positioning support is widely available.

@akilvishnum
Copy link
Author

Agreed.
We should wrap this code in requestAnimationFrame and use transform atleast.

Should I proceed with that?

@akilvishnum
Copy link
Author

#124

@knadh
Copy link
Owner

knadh commented Mar 4, 2026

Yep, we can try that. Please update the PR.

@akilvishnum
Copy link
Author

Hi @knadh

I have updated the PR with the following changes.

  • Wrapped the positioning logic in requestAnimationFrame and migrated from top/left to transform.
  • Removed transform from the CSS source to prevent property conflicts, as the positioning is now handled dynamically via JavaScript.

@akilvishnum
Copy link
Author

@knadh
Did you got any chance to review this PR?
If it needs any changes, please let me know.

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