Skip to content

Commit

Permalink
Merge pull request #7111 from J-Michalek/fix/textarea-resize
Browse files Browse the repository at this point in the history
fix(textarea): issues with ResizeObserver inside of Firefox
  • Loading branch information
tugcekucukoglu authored Jan 20, 2025
2 parents 10694a2 + 67f02c2 commit a8cc66d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/primevue/src/textarea/Textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default {
mounted() {
if (this.autoResize) {
this.observer = new ResizeObserver(() => {
this.resize();
// Firefox has issues without the requestAnimationFrame - ResizeObserver loop completed with undelivered notifications.
requestAnimationFrame(() => {
this.resize();
});
});
this.observer.observe(this.$el);
}
Expand Down

0 comments on commit a8cc66d

Please sign in to comment.