pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.17k stars 262 forks source link

Use `offsetHeight` instead of `getBoundingClientRect` to calculate list height #120

Closed pacocoursey closed 1 year ago

pacocoursey commented 1 year ago

offsetHeight ignores transforms, so it may calculate the wrong height when a scale or transform is applied to the List or any parent elements.