From 27649ebfa2105af184208f1d4fb4c3d6114c9550 Mon Sep 17 00:00:00 2001 From: Anton SHEPILOV Date: Tue, 7 May 2024 15:31:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84Text-align=20to=20the=20right=20for?= =?UTF-8?q?=20the=20select=20in=20Safari?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/frontend/src/app/atoms/input/input-select.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tdrive/frontend/src/app/atoms/input/input-select.tsx b/tdrive/frontend/src/app/atoms/input/input-select.tsx index f9573e74..bab0c936 100644 --- a/tdrive/frontend/src/app/atoms/input/input-select.tsx +++ b/tdrive/frontend/src/app/atoms/input/input-select.tsx @@ -1,5 +1,6 @@ import _, { isUndefined } from "lodash"; import { defaultInputClassName, errorInputClassName, ThemeName } from './input-text'; +import { CSSProperties } from "@material-ui/styles"; export type SelectSize = 'md' | 'lg' | 'sm'; @@ -22,9 +23,10 @@ export function Select(props: InputProps) { else if (props.size === 'sm') inputClassName = inputClassName + ' text-sm h-7 py-0 px-3'; else inputClassName = inputClassName + ' text-base h-9 py-1'; - let styles = {}; + //special for safari + let styles = { textAlignLast: "right" } as CSSProperties; const noFocus = isUndefined(props.noFocusBorder) ? true : props.noFocusBorder; - if (noFocus) styles = {boxShadow: "none", borderColor: "inherit"}; + if (noFocus) styles = _.assign(styles, {boxShadow: "none", borderColor: "inherit"}); return (