HarryChen0506 / react-markdown-editor-lite

a light-weight Markdown editor based on React. 一款轻量的基于React的markdown编辑器
https://harrychen0506.github.io/react-markdown-editor-lite/
MIT License
1.03k stars 160 forks source link

[BUG] Autoresize not working if updating value externally (field has no focus) #285

Open fgatti675 opened 1 year ago

fgatti675 commented 1 year ago

Thank you for an amazing library!

Your environment

MacOS Ventura, Chrome For example, Windows 10, Chrome 109

Description

There is a small bug with the autoresize plugin, when the value is updated by the user (the markdown field is focused), it resizes correctly. If the value is updated via an external action, it does not resize. I attach an example reproducing the issue. Thank you 🙏

Reproduction URL

https://codesandbox.io/s/falling-sun-t4xos5?file=/src/App.js