-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
@@ -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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try this:
- Place the caret to the empty block
- Press Tab to open the Toolbox
- Press Esc to close the Toolbox
The Caret should return to the empty block. In case of removing this line that wouldn't happenn.
There was a problem hiding this comment.
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
Fixes problem with text selection from right to left. Moving caret to block start on toolbox close was causing the problem.
Resolves #2045