Root Cause: Clicks on the suggestion dropdown menu forcibly change the anchorOffset and focusOffset position of the cursor.
Resolved by:
Establishing the mentionIndex prior to the click taking place, and passing it into the addMention function.
This was the optimal quick solution for now since stopping click event propagation or preventing default click behavior did not prevent the cursor position from updating.
Any expediency with reviewing and merging this bug fix would be appreciated, @jpuri.
Resolved the following issue: https://github.com/jpuri/react-draft-wysiwyg/issues/1429.
Root Cause: Clicks on the suggestion dropdown menu forcibly change the
anchorOffset
andfocusOffset
position of the cursor.Resolved by:
mentionIndex
prior to the click taking place, and passing it into theaddMention
function.This was the optimal quick solution for now since stopping click event propagation or preventing default click behavior did not prevent the cursor position from updating.
Any expediency with reviewing and merging this bug fix would be appreciated, @jpuri.