focalboard
focalboard copied to clipboard
Bug: Board description editing text cursor appears at end of string
Steps to reproduce the behavior
- Go to a board with a title & description
- Click anywhere in the title and notice the text cursor appears where the mouse cursor was
- Click anywhere in the description and notice the text cursor appears at the end of the string
Expected behavior
The text cursor to go where the mouse cursor clicked, just like the title behavior.
Screenshots (optional)
https://user-images.githubusercontent.com/6335792/181614294-06fcfd6f-253b-4b9f-aaae-d2b5e3f2aed2.mov
Edition and Platform
- Edition: Mattermost Boards (plugin)
- Version: 7.2 community clone bug bash
- Browser and OS: FF103 Mac
hi @wuwinson @Pinjasaur This bug looks interesting to me. May I take it? :-)
Thanks @WhiteHsu! I've assigned the ticket to you.
@wuwinson thanks and will do!
Hi @WhiteHsu, the title of the board uses input
element that is why it knows how to position the cursor on focus.
Description of the board is a lot more complex because it is rendered as html coming from markdown editor. So determining the position of the cursor is not that trivial. Specifically there is an html preview when the editor is not even active, so during the click on html preview the editor is created and this is the moment when the cursor position can be set properly.
Thanks for the guidance @kamre ! Will look into it accordingly. :D