From 37d6b31f175b560ed3271c7e721c2715ab456d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Mon, 5 Feb 2024 12:17:34 +0100 Subject: [PATCH] fix placeholder color when value is empty at the beginning --- src/MarkdownTextInput.web.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MarkdownTextInput.web.tsx b/src/MarkdownTextInput.web.tsx index 85bbd95b..154339c9 100644 --- a/src/MarkdownTextInput.web.tsx +++ b/src/MarkdownTextInput.web.tsx @@ -104,7 +104,7 @@ const MarkdownTextInput = React.forwardRef( onSelectionChange, onSubmitEditing, placeholder, - placeholderTextColor = '#ccc', + placeholderTextColor = `rgba(0,0,0,0.2)`, selectTextOnFocus, spellCheck, style = {}, @@ -369,7 +369,7 @@ const MarkdownTextInput = React.forwardRef( updateTextColor(r, ''); }; - if (value === undefined) { + if (value === '' || value === undefined) { updateTextColor(r, r.innerText); } }