Skip to content

Commit 04f82ea

Browse files
authored
Fix: stop using absolute position to hide Checkbox input (#227)
1 parent 7e980b5 commit 04f82ea

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
2323
- [PATCH] Corrections for how height is calculated in `MultiLineInput`
2424
- [MAJOR] Removed `Head` in favor of react 19 inline metadata tags
2525
- [MINOR] Added `isResizableVertically` and `isResizableHorizontally` to `MultiLineInput`
26+
- [MAJOR] Fix for `Checkbox` to not use aboslute positioning to hide the input
2627

2728
### Removed
2829

src/atoms/checkbox/component.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,14 @@ const StyledContainer = styled.label<IStyledCheckboxProps>`
118118
`;
119119

120120
const StyledHiddenCheckbox = styled.input`
121+
opacity: 0;
122+
pointer-events: none;
123+
width: 0 !important;
124+
height: 0 !important;
125+
margin: 0;
126+
padding: 0;
121127
border: 0;
122-
clip: rect(0 0 0 0);
123-
clippath: inset(50%);
124-
height: 1px;
125-
width: 1px;
126-
margin: -1px;
127128
overflow: hidden;
128-
padding: 0;
129-
position: absolute;
130-
white-space: nowrap;
131129
`;
132130

133131
const StyledCheckbox = styled.div`

src/molecules/optionSelect/documentation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Template = (args) => {
1616
<div style={{height: '250px'}}>
1717
<OptionSelect {...args} selectedItemKey={args.selectedItemKey || selectedItemKey} options={args.options || options} onItemClicked={args.onItemClicked || setSelectedItemKey} />
1818
</div>
19-
);
19+
);
2020
};
2121

2222
<Canvas withToolbar={true} withSource={'none'}>

0 commit comments

Comments
 (0)