Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Stop jumping to block start on toolbox close #2055

Merged
merged 4 commits into from
May 13, 2022

Conversation

TatianaFomina
Copy link
Contributor

Fixes problem with text selection from right to left. Moving caret to block start on toolbox close was causing the problem.

Resolves #2045

@@ -167,7 +167,6 @@ export default class Toolbar extends Module<ToolbarNodes> {
opened: this.toolboxInstance.opened,
close: (): void => {
this.toolboxInstance.close();
this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@neSpecc
didn't get why this line is needed, so removed it. If it is needed, it can be executed on condition or moved to some other place

Copy link
Member

Choose a reason for hiding this comment

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

Try this:

  1. Place the caret to the empty block
  2. Press Tab to open the Toolbox
  3. Press Esc to close the Toolbox

The Caret should return to the empty block. In case of removing this line that wouldn't happenn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, moved this line to function called on esc press

@TatianaFomina TatianaFomina merged commit c1d7744 into next May 13, 2022
@neSpecc neSpecc deleted the fix/keyboard-selection branch May 13, 2022 16:21
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.

[Bug] Keyboard selection by word doesn't work when selecting from right to left
4 participants