Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix copy paste and delete error core paragraph with locking #14712
Rich text is able to handle the situation of onReplace and onRemove not existing.
How has this been tested?
I added the following CPT with locking:
I verified I can paste in the paragraph.
I verified that If I revert the fix in the paragraph block the tests start failing.
Hi @aduth following #6587 would not solve this bug.
That said one option I see to go with #6587 while solving this bug without big changes to rich text would be to have a BLOCK_EDITOR_NOOP variable referencing a function that is passed when the operation is not available. RichText would then be able to easily check if the action is not possible by comparing against BLOCK_EDITOR_NOOP.
aduth left a comment
This wasn't clear, but I tested and I see what you mean now: RichText changes its behavior based on whether it receives an
Alternatively, we could revise the implementation so that we always pass an
That being said, this is still an improvement, and allows us some time to consider whether we want to guarantee a function to be passed always (#6587) separately.