Skip to content

Commit a218a5d

Browse files
fix(react-color-picker): Y axis focus fix (#33899)
1 parent e735608 commit a218a5d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: focus on Y axis",
4+
"packageName": "@fluentui/react-color-picker-preview",
5+
"email": "v.kozlova13@gmail.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-color-picker-preview/library/src/components/ColorArea/ColorArea.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe('ColorArea', () => {
2929
<input
3030
class="fui-ColorArea__inputY"
3131
id="sliderY-16"
32+
tabindex="-1"
3233
type="range"
3334
value="50"
3435
/>

packages/react-components/react-color-picker-preview/library/src/components/ColorArea/useColorArea.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export const useColorArea_unstable = (props: ColorAreaProps, ref: React.Ref<HTML
184184
defaultProps: {
185185
id: useId('sliderY-'),
186186
type: 'range',
187-
...(activeAxis && { tabIndex: activeAxis === 'y' ? 0 : -1 }),
187+
tabIndex: activeAxis && activeAxis === 'y' ? 0 : -1,
188188
},
189189
elementType: 'input',
190190
}),

0 commit comments

Comments
 (0)