Fix autosize skipping position: fixed textareas (#3187)

This commit is contained in:
Bartosz-Do authored and GitHub committed 2026-09-25 12:04:29 +02:00
1 parent 3460091414
commit c89bf8da57
3 files changed
+16 -1

No files matched your search

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Fixed autosize not resizing a `position: fixed` textarea.
+1 -1
View File
@@ -92,7 +92,7 @@ class Autosize extends BaseComponent {
// Public
update(): void {
const element = this._element
if (!element.isConnected || element.offsetParent === null) {
if (!element.isConnected || element.getClientRects().length === 0) {
return
}
+10
View File
@@ -85,6 +85,16 @@ describe('Autosize', () => {
expect(height()).toBe(46)
})
it('should still update a position: fixed field', () => {
textarea().style.position = 'fixed'
const instance = new Autosize(textarea())
textarea().value = lines(3)
instance.update()
expect(height()).toBe(60)
})
})
describe('dispose', () => {