fix(textarea): issues with ResizeObserver inside of Firefox

pull/7111/head
Jakub Michálek 2025-01-17 13:16:10 +01:00
parent f481158d36
commit 67f02c2ee7
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}