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

Bug Fix For When "/" Overides external text #2894

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

obafemitayor
Copy link

@obafemitayor obafemitayor commented Dec 21, 2024

Related Issue

What Changed

  • Bug fix for when text outside the editor is overidden with a "/" character when trying to add a text block in the editor

Testing Strategy

@@ -477,6 +477,12 @@ export default class UI extends Module<UINodes> {
* @param {KeyboardEvent} event - keyboard event
*/
private documentKeydown(event: KeyboardEvent): void {
Copy link
Member

Choose a reason for hiding this comment

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

this method is designed to handle keydowns on document. I'm afraid that this change break something like inserting new block on Enter when no block is focused, etc.

The possible problem place is the BlockEvents@slachPressed

this.Editor.Caret.insertContentAtCaretPosition('/');

So it is expected to see a fix there.

Copy link
Author

Choose a reason for hiding this comment

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

@neSpecc I have moved the fix to BlockEvents

Copy link
Author

Choose a reason for hiding this comment

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

Hello @neSpecc, have you had a chance to check this again?

@obafemitayor obafemitayor requested a review from neSpecc December 21, 2024 16:03
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.

3 participants