Rich Text: Remove NewBlock event handling #7617
Merged
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.
This pull request seeks to remove the
NewBlock
event handling from theRichText
component. The function neither has DocBlock nor is publicly documented in the RichText documentation, so I was unable to determine its reason for being. Prompting justification on its introduction in #409 (comment) was further unsuccessful in determining that it needs to exist. We currently have no core components which are bothmultiline="p"
and have anonSplit
function passed to itsRichText
, so it appears to be unreachable. Per its introduction in #409, it may have been useful for when the text block could allow enter presses and a second press responsible for creating the split block.Based on explorations in #7583, we may want to leverage TinyMCE's
NewBlock
event, but I believe we should do so consistent for all splitting behavior. In the meantime, it should be removed.Testing instructions:
Verify there are no regressions for block splitting, namely:
There should be end-to-end tests for this. See also #6467.