focalboard icon indicating copy to clipboard operation
focalboard copied to clipboard

Bug: Board description editing text cursor appears at end of string

Open Pinjasaur opened this issue 1 year ago • 5 comments

Steps to reproduce the behavior

  1. Go to a board with a title & description
  2. Click anywhere in the title and notice the text cursor appears where the mouse cursor was
  3. 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

Pinjasaur avatar Jul 28 '22 18:07 Pinjasaur

hi @wuwinson @Pinjasaur This bug looks interesting to me. May I take it? :-)

WhiteHsu avatar Oct 25 '22 15:10 WhiteHsu

Thanks @WhiteHsu! I've assigned the ticket to you.

wuwinson avatar Oct 25 '22 15:10 wuwinson

@wuwinson thanks and will do!

WhiteHsu avatar Oct 25 '22 15:10 WhiteHsu

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.

kamre avatar Oct 25 '22 16:10 kamre

Thanks for the guidance @kamre ! Will look into it accordingly. :D

WhiteHsu avatar Oct 26 '22 14:10 WhiteHsu