Skip to content

Fix copy when focus is not on editor#255

Merged
AndreasArvidsson merged 2 commits intomasterfrom
fix-copy
Sep 1, 2021
Merged

Fix copy when focus is not on editor#255
AndreasArvidsson merged 2 commits intomasterfrom
fix-copy

Conversation

@pokey
Copy link
Copy Markdown
Member

@pokey pokey commented Sep 1, 2021

Unfortunately, we aren't able to set focus back to where it was before, eg a search box. Maybe this argues for switching back to our own copy implementation?


editor.selections = targetSelections;
// For command to the work we have to have the correct editor focused
await setSelectionsAndFocusEditor(editor, targetSelections, false);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When setting selections and focusing editor it is important to first set the selections and then focus the editor. This was fixed in the setSelectionsAndFocusEditor function but because it wasn't used here we didn't get that fix

@AndreasArvidsson AndreasArvidsson merged commit 870e20f into master Sep 1, 2021
@AndreasArvidsson AndreasArvidsson deleted the fix-copy branch September 1, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants