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

Slash command doesn't clear when / is deleted #33246

Closed
Robertght opened this issue Jul 7, 2021 · 3 comments · Fixed by #33450
Closed

Slash command doesn't clear when / is deleted #33246

Robertght opened this issue Jul 7, 2021 · 3 comments · Fixed by #33450
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@Robertght
Copy link

Steps to reproduce the behavior

  1. Create a new post
  2. Type the / block inserter shortcut
  3. Remove the /

What I expected to happen

The / window to be hidden

What actually happened

The / window persisted until I pressed delete a second time and can jump around if you click away and back into a block area. This can lead to overlap on narrower content areas.

Context

Empathy testing

Browser / OS version

Chrome 91.0.4472.114 OS X

Is this specific to the applied theme? Which one?

No

Is there any console output or error text?

No

Screenshot / Video: If applicable, add screenshots to help explain your problem.

image

Original report in Automattic/wp-calypso#54330

@Mamaduka Mamaduka added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Jul 7, 2021
@Mamaduka
Copy link
Member

Mamaduka commented Jul 7, 2021

Probably related to #32986.

@talldan talldan added the [Type] Bug An existing feature does not function as intended label Jul 7, 2021
@talldan
Copy link
Contributor

talldan commented Jul 7, 2021

I've noticed this too!

@Mamaduka
Copy link
Member

Mamaduka commented Jul 7, 2021

I did some testing, and if I change undefined to 0 for the hasSelection check`, the issue gets fixed.

const hasSelection = record.start !== undefined;

Unfortunately, I'm not very familiar with the RichText component, so I don't want to introduce any regressions.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants