File tree Expand file tree Collapse file tree 7 files changed +41
-30
lines changed Expand file tree Collapse file tree 7 files changed +41
-30
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ concurrency:
7
7
cancel-in-progress : true
8
8
9
9
env :
10
- NODE_VERSION : 12 .x
10
+ NODE_VERSION : 16 .x
11
11
12
12
jobs :
13
13
install :
Original file line number Diff line number Diff line change 47
47
"jest" : " 26" ,
48
48
"lint-staged" : " ^12.2.1" ,
49
49
"npm-run-all" : " ^4.1.5" ,
50
- "prettier" : " ^2.5.1 " ,
50
+ "prettier" : " ^2.6.2 " ,
51
51
"prettier-plugin-tailwindcss" : " ^0.1.4" ,
52
52
"rimraf" : " ^3.0.2" ,
53
53
"tslib" : " ^2.3.1" ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
- Improve outside click of ` Dialog ` component ([ #1546 ] ( https://github.com/tailwindlabs/headlessui/pull/1546 ) )
19
19
- Detect outside clicks from within ` <iframe> ` elements ([ #1552 ] ( https://github.com/tailwindlabs/headlessui/pull/1552 ) )
20
20
- Improve Combobox input cursor position ([ #1574 ] ( https://github.com/tailwindlabs/headlessui/pull/1574 ) )
21
+ - Fix scrolling issue in ` Tab ` component when using arrow keys ([ #1584 ] ( https://github.com/tailwindlabs/headlessui/pull/1584 ) )
21
22
22
23
## [ 1.6.4] - 2022-05-29
23
24
Original file line number Diff line number Diff line change @@ -366,18 +366,22 @@ let TabRoot = forwardRefWithAs(function Tab<TTag extends ElementType = typeof DE
366
366
return focusIn ( list , Focus . Last )
367
367
}
368
368
369
- return match ( orientation , {
370
- vertical ( ) {
371
- if ( event . key === Keys . ArrowUp ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
372
- if ( event . key === Keys . ArrowDown ) return focusIn ( list , Focus . Next | Focus . WrapAround )
373
- return
374
- } ,
375
- horizontal ( ) {
376
- if ( event . key === Keys . ArrowLeft ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
377
- if ( event . key === Keys . ArrowRight ) return focusIn ( list , Focus . Next | Focus . WrapAround )
378
- return
379
- } ,
380
- } )
369
+ if (
370
+ match ( orientation , {
371
+ vertical ( ) {
372
+ if ( event . key === Keys . ArrowUp ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
373
+ if ( event . key === Keys . ArrowDown ) return focusIn ( list , Focus . Next | Focus . WrapAround )
374
+ return
375
+ } ,
376
+ horizontal ( ) {
377
+ if ( event . key === Keys . ArrowLeft ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
378
+ if ( event . key === Keys . ArrowRight ) return focusIn ( list , Focus . Next | Focus . WrapAround )
379
+ return
380
+ } ,
381
+ } )
382
+ ) {
383
+ return event . preventDefault ( )
384
+ }
381
385
} )
382
386
383
387
let handleFocus = useEvent ( ( ) => {
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
- Detect outside clicks from within ` <iframe> ` elements ([ #1552 ] ( https://github.com/tailwindlabs/headlessui/pull/1552 ) )
20
20
- Only render the ` Dialog ` on the client ([ #1566 ] ( https://github.com/tailwindlabs/headlessui/pull/1566 ) )
21
21
- Improve Combobox input cursor position ([ #1574 ] ( https://github.com/tailwindlabs/headlessui/pull/1574 ) )
22
+ - Fix scrolling issue in ` Tab ` component when using arrow keys ([ #1584 ] ( https://github.com/tailwindlabs/headlessui/pull/1584 ) )
22
23
23
24
## [ 1.6.4] - 2022-05-29
24
25
Original file line number Diff line number Diff line change @@ -247,18 +247,23 @@ export let Tab = defineComponent({
247
247
return focusIn ( list , Focus . Last )
248
248
}
249
249
250
- return match ( api . orientation . value , {
251
- vertical ( ) {
252
- if ( event . key === Keys . ArrowUp ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
253
- if ( event . key === Keys . ArrowDown ) return focusIn ( list , Focus . Next | Focus . WrapAround )
254
- return
255
- } ,
256
- horizontal ( ) {
257
- if ( event . key === Keys . ArrowLeft ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
258
- if ( event . key === Keys . ArrowRight ) return focusIn ( list , Focus . Next | Focus . WrapAround )
259
- return
260
- } ,
261
- } )
250
+ if (
251
+ match ( api . orientation . value , {
252
+ vertical ( ) {
253
+ if ( event . key === Keys . ArrowUp ) return focusIn ( list , Focus . Previous | Focus . WrapAround )
254
+ if ( event . key === Keys . ArrowDown ) return focusIn ( list , Focus . Next | Focus . WrapAround )
255
+ return
256
+ } ,
257
+ horizontal ( ) {
258
+ if ( event . key === Keys . ArrowLeft )
259
+ return focusIn ( list , Focus . Previous | Focus . WrapAround )
260
+ if ( event . key === Keys . ArrowRight ) return focusIn ( list , Focus . Next | Focus . WrapAround )
261
+ return
262
+ } ,
263
+ } )
264
+ ) {
265
+ return event . preventDefault ( )
266
+ }
262
267
}
263
268
264
269
function handleFocus ( ) {
Original file line number Diff line number Diff line change @@ -4326,10 +4326,10 @@ prettier-plugin-tailwindcss@^0.1.4:
4326
4326
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.1.8.tgz#ba0f606ed91959ede670303d905b99106e9e6293"
4327
4327
integrity sha512-hwarSBCswAXa+kqYtaAkFr3Vop9o04WOyZs0qo3NyvW8L7f1rif61wRyq0+ArmVThOuRBcJF5hjGXYk86cwemg==
4328
4328
4329
- prettier@^2.5.1 :
4330
- version "2.5.1 "
4331
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1 .tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a "
4332
- integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg ==
4329
+ prettier@^2.6.2 :
4330
+ version "2.6.2 "
4331
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2 .tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032 "
4332
+ integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew ==
4333
4333
4334
4334
pretty-format@^26.1.0, pretty-format@^26.6.2 :
4335
4335
version "26.6.2"
You can’t perform that action at this time.
0 commit comments