From 02af84e894868d3f2d2ce510bb38d2507797744f 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 | 1 + .../__snapshots__/Input.test.tsx.snap | 21 +++ .../atoms/metricInput/MetricInput.tsx | 9 +- .../__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, 252 insertions(+), 1 deletion(-) diff --git a/core/components/atoms/input/Input.tsx b/core/components/atoms/input/Input.tsx index 1a959095e0..1c2b4b5480 100644 --- a/core/components/atoms/input/Input.tsx +++ b/core/components/atoms/input/Input.tsx @@ -230,6 +230,7 @@ export const Input = React.forwardRef((props, forw onClick={() => ref.current?.focus()} role="presentation" onBlur={() => setIsInputBlank(!ref.current?.value)} + 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" >