From 59f6cfc79a37c2748b93b8272700215b58828260 Mon Sep 17 00:00:00 2001 From: Satyam Chatterjee Date: Tue, 25 Jul 2023 17:58:35 +0530 Subject: [PATCH] fix(input): update input wrapper focus on padding click --- core/components/atoms/input/Input.tsx | 2 + .../__snapshots__/Input.test.tsx.snap | 21 +++ .../atoms/metricInput/MetricInput.tsx | 10 +- .../__tests__/MetricInput.test.tsx | 13 ++ .../__snapshots__/MetricInput.test.tsx.snap | 4 + .../__snapshots__/InputMask.test.tsx.snap | 1 + .../__snapshots__/Pagination.test.tsx.snap | 1 + .../VerificationCodeInput.test.tsx.snap | 168 ++++++++++++++++++ .../__snapshots__/DatePicker.test.tsx.snap | 1 + .../DateRangePicker.test.tsx.snap | 24 +++ .../__snapshots__/TimePicker.test.tsx.snap | 8 + .../__tests__/__snapshots__/TS.test.tsx.snap | 2 + 12 files changed, 254 insertions(+), 1 deletion(-) diff --git a/core/components/atoms/input/Input.tsx b/core/components/atoms/input/Input.tsx index 1a959095e0..de28d8e6fd 100644 --- a/core/components/atoms/input/Input.tsx +++ b/core/components/atoms/input/Input.tsx @@ -230,6 +230,8 @@ export const Input = React.forwardRef((props, forw onClick={() => ref.current?.focus()} role="presentation" onBlur={() => setIsInputBlank(!ref.current?.value)} + /* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, jsx-a11y/tabindex-no-positive*/ + tabIndex={1} > {inlineLabel && (
diff --git a/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap b/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap index c6c015e081..c4e31e441a 100644 --- a/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap +++ b/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap @@ -10,6 +10,7 @@ exports[`Input component data-test="DesignSystem-InputWrapper" role="presentation" style="min-width: 256px;" + tabindex="1" >