Open bytemain opened 5 years ago
Facing the same issue
@lengthmin @zohaibijaznbs hey thanks for opening this. Hm, are you manually focusing before the editor is fully rendered? Try throwing a setTimeout
=> then focus, just to see if we can further identify what's going on
test failed. it just won't show the line number and cursor, and it is focused.
@lengthmin @zohaibijaznbs I am a lot shorter on time these days as when I started this project. Codemirror & React APIs are moving to quickly for me to keep atop of for the day-to-day. I am looking for a co-maintainer of this project. Please contact me directly if you are interested. Thank you for understanding.
I use a button to control the display of codemirror, and when I click the button, the codemirror would be focus. so I use
this.CodeMirrorInstance
to control the codemirror component's focus, and it successed. but it won't render the cursor and line numbers, until I press some key or click the input area.gif: