From ee9908aab2aca1fa1b11e881d0ce8273c82ac9cd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 23 Dec 2022 11:38:42 -0600 Subject: [PATCH] AutosuggestInput/AutosuggestTextarea: actually, just remove RTL checking. The browser should handle it --- app/soapbox/components/autosuggest-input.tsx | 9 --------- app/soapbox/components/autosuggest-textarea.tsx | 8 -------- 2 files changed, 17 deletions(-) diff --git a/app/soapbox/components/autosuggest-input.tsx b/app/soapbox/components/autosuggest-input.tsx index a5d5737d0e..c4bf49d72c 100644 --- a/app/soapbox/components/autosuggest-input.tsx +++ b/app/soapbox/components/autosuggest-input.tsx @@ -8,7 +8,6 @@ import AutosuggestEmoji, { Emoji } from 'soapbox/components/autosuggest-emoji'; import Icon from 'soapbox/components/icon'; import { Input } from 'soapbox/components/ui'; import AutosuggestAccount from 'soapbox/features/compose/components/autosuggest-account'; -import { isRtl } from 'soapbox/rtl'; import { textAtCursorMatchesToken } from 'soapbox/utils/suggestions'; import type { Menu, MenuItem } from 'soapbox/components/dropdown-menu'; @@ -264,15 +263,8 @@ export default class AutosuggestInput extends ImmutablePureComponent @@ -291,7 +283,6 @@ export default class AutosuggestInput extends ImmutablePureComponent render() { const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, children, condensed, id } = this.props; const { suggestionsHidden } = this.state; - 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))) { - style.direction = 'rtl'; - } return [
@@ -257,7 +250,6 @@ class AutosuggestTextarea extends ImmutablePureComponent onFocus={this.onFocus} onBlur={this.onBlur} onPaste={this.onPaste} - style={style as any} aria-autocomplete='list' />