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 Dec 7, 2023
1 parent b4a35e6 commit 88fb342
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 88fb342

Please sign in to comment.