Skip to content

Commit

Permalink
Rich text: fix error when attempting to remove placeholder on composi…
Browse files Browse the repository at this point in the history
…tion start (#42821)
  • Loading branch information
ellatrix authored Aug 1, 2022
1 parent a14080d commit 6d62fa9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export function useInputAndSelection( props ) {
// during composition, the placeholder doesn't get removed. There's
// no need to re-add it, when the value is updated on compositionend
// it will be re-added when the value is empty.
element.querySelector( `[${ PLACEHOLDER_ATTR_NAME }]` ).remove();
element.querySelector( `[${ PLACEHOLDER_ATTR_NAME }]` )?.remove();
}

function onCompositionEnd() {
Expand Down

0 comments on commit 6d62fa9

Please sign in to comment.