fix: Avoid project placeholder shadowing

This commit is contained in:
Danny Avila 2026-06-02 17:32:34 -04:00
parent 6741b70f26
commit 3d50d2619b

View file

@ -111,17 +111,17 @@ export default function useTextarea({
})}`;
};
const placeholder = getPlaceholderText();
const placeholderText = getPlaceholderText();
if (textAreaRef.current?.getAttribute('placeholder') === placeholder) {
if (textAreaRef.current?.getAttribute('placeholder') === placeholderText) {
return;
}
const setPlaceholder = () => {
const placeholder = getPlaceholderText();
const placeholderText = getPlaceholderText();
if (textAreaRef.current?.getAttribute('placeholder') !== placeholder) {
textAreaRef.current?.setAttribute('placeholder', placeholder);
if (textAreaRef.current?.getAttribute('placeholder') !== placeholderText) {
textAreaRef.current?.setAttribute('placeholder', placeholderText);
forceResize(textAreaRef.current);
}
};