Skip to content

Commit

Permalink
fix(dashboard): use textContent to render hidden title (apache#26189)
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai authored and sfirke committed Mar 22, 2024
1 parent 9f7ad45 commit fc401d5
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ export const DynamicEditableTitle = ({
// then we can measure the width of that span to resize the input element
useLayoutEffect(() => {
if (sizerRef?.current) {
sizerRef.current.innerHTML = (currentTitle || placeholder).replace(
/\s/g,
' ',
);
sizerRef.current.textContent = currentTitle || placeholder;
}
}, [currentTitle, placeholder, sizerRef]);

Expand Down

0 comments on commit fc401d5

Please sign in to comment.