Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions components/input/ResizableTextArea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down