added RTL support
This commit is contained in:
@@ -334,6 +334,7 @@ export function Auth() {
|
||||
const element = evt.target as HTMLInputElement;
|
||||
element.value = element.value.trim();
|
||||
}}
|
||||
dir="auto"
|
||||
/>
|
||||
</div>
|
||||
{view === 'email' && (
|
||||
@@ -345,6 +346,7 @@ export function Auth() {
|
||||
type="email"
|
||||
placeholder={intl.formatMessage(messages.emailAddress)}
|
||||
disabled={isLoading}
|
||||
dir="auto"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -461,6 +461,7 @@ export class CommentForm extends Component<Props, State> {
|
||||
disabled={isDisabled}
|
||||
autofocus={!!autofocus}
|
||||
spellcheck={true}
|
||||
dir="auto"
|
||||
/>
|
||||
</TextExpander>
|
||||
{charactersLeft < 100 && <span className="comment-form__counter">{charactersLeft}</span>}
|
||||
@@ -518,6 +519,7 @@ export class CommentForm extends Component<Props, State> {
|
||||
className="comment-form__preview raw-content"
|
||||
// eslint-disable-next-line react/no-danger
|
||||
dangerouslySetInnerHTML={{ __html: preview }}
|
||||
dir="auto"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -336,7 +336,7 @@ export class Comment extends Component<CommentProps, State> {
|
||||
if (props.view === 'preview') {
|
||||
return (
|
||||
<article className={b('comment', { mix: props.mix }, defaultMods)}>
|
||||
<div className="comment__body">
|
||||
<div className="comment__body" dir="auto">
|
||||
{!!o.title && (
|
||||
<div className="comment__title">
|
||||
<a className="comment__title-link" href={`${o.locator.url}#${COMMENT_NODE_CLASSNAME_PREFIX}${o.id}`}>
|
||||
@@ -477,6 +477,7 @@ export class Comment extends Component<CommentProps, State> {
|
||||
ref={this.textNode}
|
||||
// eslint-disable-next-line react/no-danger
|
||||
dangerouslySetInnerHTML={{ __html: o.text }}
|
||||
dir="auto"
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ export const TextareaAutosize = forwardRef<HTMLTextAreaElement, Props>(({ onInpu
|
||||
}
|
||||
}, [value, ref]);
|
||||
|
||||
return <textarea {...props} data-testid={props.id} onInput={handleInput} value={value} ref={ref} />;
|
||||
return <textarea {...props} data-testid={props.id} onInput={handleInput} value={value} ref={ref} dir="auto" />;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user