Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't think RichText should be responsible for inserting characters, because this varies by keyboards and language and user settings. If the browser is blocking spaces to be inserted because of some other behaviour, the behaviour should be prevented some other way.
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.
Thanks for looking at this! Are you saying that the fix for this issue belongs somewhere else, or that we should be smarter about the locale of the character we are inserting on line 532? I want to do it the right way, and would appreciate your help understanding what that is.
I spent a lot of time on #23940 looking for a way to fix this at the block level but couldn't get it to work without any luck. Something about the way that Firefox handles the spacebar in a
<summary contenteditable>
element eats the space character, so the two solutions I came up with were:RichText
a div child of the<summary>
element, which means either rendering that on the client side or having separate CSS for the editor and clientI appreciate any pointers on how to make this better, and thanks again for the feedback.
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.
I don't know honestly. First, since this is a problem only with the summary element, we should fix it in the block and not in rich text imo. Maybe you can prevent default the event? Not sure. If the only way is to insert the character ourselves, maybe have a look at the data property in the event and insert that data?