Do the selection even if there is already a selection

This commit is contained in:
Bruno Ribeito
2017-11-08 23:27:00 +00:00
parent 2865d935b6
commit 18b86a1cbc
3 changed files with 25 additions and 4 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextA
export function rightClickHandler(ev: MouseEvent, textarea: HTMLTextAreaElement, selectionManager: ISelectionManager, shouldSelectWord: boolean): void {
moveTextAreaUnderMouseCursor(ev, textarea);
if (shouldSelectWord && !selectionManager.hasSelection)
if (shouldSelectWord && (!selectionManager.hasSelection || !selectionManager.isClickInSelection(ev)))
selectionManager.selectWordAtCursor(ev);
// Get textarea ready to copy from the context menu