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

Rich text toolbar bold/italic behaves differently to keyboard shortcut #11065

Closed
johngodley opened this issue Oct 25, 2018 · 1 comment
Closed
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Enhancement A suggestion for improvement.

Comments

@johngodley
Copy link
Contributor

The behaviour of the rich text formatting tools is different depending if you use the toolbar or keyboard shortcuts.

If you place the caret on a word in a paragraph and press the bold button it does nothing. If you press cmd+b it highlights the word and makes it bold. The same occurs for italic.

To Reproduce
Steps to reproduce the behavior:

  1. Create a paragraph block
  2. Enter some words
  3. Place the caret in a word
  4. Click the bold button in the rich text toolbar, note how nothing changes
  5. Press cmd+b and note how the word is highlight and becomes bold

Maybe related to #11062.

Expected behavior
I like how cmd+b highlights the word and would expect the toolbar button to do the same.

Additionally, placing the caret at the end of a word and before a space and then pressing cmd+b should highlight the previous word. Currently it highlights the space.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version [e.g. 22]
@johngodley johngodley added [Type] Enhancement A suggestion for improvement. [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Oct 25, 2018
@ellatrix
Copy link
Member

This was normalised in #10209. Whether the current behaviour for an uncollapsed selection inside a word is right, I don't know, but it can be discussed in a separate issue. Looking at the old editor, it would make the word bold if the caret is inside the word, and insert a placeholder if the caret is at the edges of the word.

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 [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants