File tree Expand file tree Collapse file tree 4 files changed +5
-11
lines changed
packages/@headlessui-react Expand file tree Collapse file tree 4 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212- Expose ` disabled ` state on ` <Tab /> ` component ([ #2918 ] ( https://github.com/tailwindlabs/headlessui/pull/2918 ) )
1313- Prevent default behaviour when clicking outside of a ` Dialog.Panel ` ([ #2919 ] ( https://github.com/tailwindlabs/headlessui/pull/2919 ) )
14+ - Use ` isFocused ` instead of ` isFocusVisible ` for ` Input ` and ` Textarea ` components ([ #2940 ] ( https://github.com/tailwindlabs/headlessui/pull/2940 ) )
1415
1516## [ 2.0.0-alpha.4] - 2024-01-03
1617
Original file line number Diff line number Diff line change @@ -1317,10 +1317,7 @@ function InputFn<
13171317 let labelledBy = useLabelledBy ( )
13181318 let describedBy = useDescribedBy ( )
13191319
1320- let { isFocusVisible : focus , focusProps } = useFocusRing ( {
1321- isTextInput : true ,
1322- autoFocus : props . autoFocus ?? false ,
1323- } )
1320+ let { isFocused : focus , focusProps } = useFocusRing ( { autoFocus : props . autoFocus ?? false } )
13241321 let { isHovered : hover , hoverProps } = useHover ( { isDisabled : data . disabled ?? false } )
13251322
13261323 let slot = useMemo (
@@ -1479,10 +1476,7 @@ function ButtonFn<TTag extends ElementType = typeof DEFAULT_BUTTON_TAG>(
14791476
14801477 let labelledBy = useLabelledBy ( [ id ] )
14811478
1482- let { isFocusVisible : focus , focusProps } = useFocusRing ( {
1483- isTextInput : true ,
1484- autoFocus : props . autoFocus ?? false ,
1485- } )
1479+ let { isFocusVisible : focus , focusProps } = useFocusRing ( { autoFocus : props . autoFocus ?? false } )
14861480 let { isHovered : hover , hoverProps } = useHover ( { isDisabled : data . disabled ?? false } )
14871481 let { pressed : active , pressProps } = useActivePress ( { disabled : data . disabled ?? false } )
14881482
Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ function InputFn<TTag extends ElementType = typeof DEFAULT_INPUT_TAG>(
5656 let labelledBy = useLabelledBy ( )
5757 let describedBy = useDescribedBy ( )
5858
59- let { isFocusVisible : focus , focusProps } = useFocusRing ( {
60- isTextInput : true ,
59+ let { isFocused : focus , focusProps } = useFocusRing ( {
6160 autoFocus : props . autoFocus ?? false ,
6261 } )
6362 let { isHovered : hover , hoverProps } = useHover ( { isDisabled : disabled ?? false } )
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ function TextareaFn<TTag extends ElementType = typeof DEFAULT_TEXTAREA_TAG>(
5656 let labelledBy = useLabelledBy ( )
5757 let describedBy = useDescribedBy ( )
5858
59- let { isFocusVisible : focus , focusProps } = useFocusRing ( { autoFocus : props . autoFocus ?? false } )
59+ let { isFocused : focus , focusProps } = useFocusRing ( { autoFocus : props . autoFocus ?? false } )
6060 let { isHovered : hover , hoverProps } = useHover ( { isDisabled : disabled ?? false } )
6161
6262 let ourProps = mergeProps (
You can’t perform that action at this time.
0 commit comments