input autofocus on PostStatusForm
partially close #65 (closed)
I ran into a problem while trying to highlight the mentions in status. It's possible only by replacing ordinary textarea with div with contenteditable="true"
. Such implementation also can be useful later, when autosuggest will be implemented. There are some external libraries for contenteditable blocks (e.g. https://www.npmjs.com/package/react-contenteditable). However, we also should care about the cursor position, and it seems that it will be easier to implement it by ourselves then use such dependencies.
The fastest method, of course, just focus textarea when modal opens, and maybe it's enough. I see that pleroma-fe doesn't highlight mentions also.
So, this MR includes
- fixed post status button (there wasn't on mobile at all somehow)
- converted PostStatusForm component into ts
- input autofocus when modal is open