diff --git a/components/input/ResizableTextArea.jsx b/components/input/ResizableTextArea.jsx index 33714e3e71..83645d5881 100644 --- a/components/input/ResizableTextArea.jsx +++ b/components/input/ResizableTextArea.jsx @@ -51,13 +51,15 @@ const ResizableTextArea = { } const { minRows, maxRows } = autoSize; const textareaStyles = calculateNodeHeight(this.$refs.textArea, false, minRows, maxRows); - this.setState({ textareaStyles, resizing: true }, () => { - raf.cancel(this.resizeFrameId); - this.resizeFrameId = raf(() => { - this.setState({ resizing: false }); - this.fixFirefoxAutoScroll(); + setTimeout(() => { + this.setState({ textareaStyles, resizing: true }, () => { + raf.cancel(this.resizeFrameId); + this.resizeFrameId = raf(() => { + this.setState({ resizing: false }); + this.fixFirefoxAutoScroll(); + }); }); - }); + }, 0); }, // https://github.com/ant-design/ant-design/issues/21870 fixFirefoxAutoScroll() {