From c7889166441b914c388ce3875d8648d4198d2446 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 23 Dec 2022 16:26:07 -0600 Subject: [PATCH] AutosuggestInput/AutosuggestTextarea: short-circuit RTL check earlier --- app/soapbox/components/autosuggest-input.tsx | 2 +- app/soapbox/components/autosuggest-textarea.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/autosuggest-input.tsx b/app/soapbox/components/autosuggest-input.tsx index c6cef9595..fe82744c1 100644 --- a/app/soapbox/components/autosuggest-input.tsx +++ b/app/soapbox/components/autosuggest-input.tsx @@ -269,7 +269,7 @@ export default class AutosuggestInput extends ImmutablePureComponent const style = { direction: 'ltr', minRows: 10 }; // TODO: convert to functional component and use `useLocale()` hook instead of checking placeholder text. - if (isRtl(value) || (placeholder && isRtl(placeholder) && !value)) { + if (isRtl(value) || (!value && placeholder && isRtl(placeholder))) { style.direction = 'rtl'; }