From 140c0b3037771288132f5013bbd8f4558f30caf6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 23 Dec 2022 11:17:06 -0600 Subject: [PATCH] AutosuggestInput/AutosuggestTextarea: determine RTL by placeholder value as well (hotfix) --- app/soapbox/components/autosuggest-input.tsx | 3 ++- app/soapbox/components/autosuggest-textarea.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/autosuggest-input.tsx b/app/soapbox/components/autosuggest-input.tsx index 35460131a..a5d5737d0 100644 --- a/app/soapbox/components/autosuggest-input.tsx +++ b/app/soapbox/components/autosuggest-input.tsx @@ -268,7 +268,8 @@ export default class AutosuggestInput extends ImmutablePureComponent const { suggestionsHidden } = this.state; const style = { direction: 'ltr', minRows: 10 }; - if (isRtl(value)) { + // TODO: convert to functional component and use `useLocale()` hook instead of checking placeholder text. + if (isRtl(value) || (placeholder && isRtl(placeholder))) { style.direction = 'rtl'; }