From 843f54476aff64ae4853ba7970c2d42cdb39ce37 Mon Sep 17 00:00:00 2001 From: David Zearing Date: Tue, 27 Mar 2018 08:22:58 -0700 Subject: [PATCH 1/3] Updating checkbox select. --- .../src/components/Checkbox/Checkbox.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts b/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts index 3f737ccb6b64d0..b1d8aebafba1fd 100644 --- a/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts +++ b/packages/office-ui-fabric-react/src/components/Checkbox/Checkbox.styles.ts @@ -48,7 +48,6 @@ export const getStyles = memoizeFunction(( alignItems: 'center', cursor: 'pointer', position: 'relative', - userSelect: 'none', textAlign: 'left' }, labelReversed: { @@ -73,6 +72,7 @@ export const getStyles = memoizeFunction(( transitionProperty: 'background, border, border-color', transitionDuration: MS_CHECKBOX_TRANSITION_DURATION, transitionTimingFunction: MS_CHECKBOX_TRANSITION_TIMING, + userSelect: 'none', /* incase the icon is bigger than the box */ overflow: 'hidden' From a21506bdeff6fe93389c6969da5484155788d33a Mon Sep 17 00:00:00 2001 From: David Zearing Date: Tue, 27 Mar 2018 08:24:55 -0700 Subject: [PATCH 2/3] addin change. --- .../checkbox_2018-03-27-15-24.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/office-ui-fabric-react/checkbox_2018-03-27-15-24.json diff --git a/common/changes/office-ui-fabric-react/checkbox_2018-03-27-15-24.json b/common/changes/office-ui-fabric-react/checkbox_2018-03-27-15-24.json new file mode 100644 index 00000000000000..1e8405353de1b7 --- /dev/null +++ b/common/changes/office-ui-fabric-react/checkbox_2018-03-27-15-24.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Checkbox: label text should be selectable, but not the checkmark icons.", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "dzearing@microsoft.com" +} \ No newline at end of file From 3f8c36127679d5081d29860b9f663beb81cf8cf1 Mon Sep 17 00:00:00 2001 From: David Zearing Date: Tue, 27 Mar 2018 09:46:52 -0700 Subject: [PATCH 3/3] Fix snapshot. --- .../components/Checkbox/__snapshots__/Checkbox.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap b/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap index 01505cb4f7b2f4..f4cc49943ab2cf 100644 --- a/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +++ b/packages/office-ui-fabric-react/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap @@ -76,7 +76,6 @@ exports[`Checkbox renders Checkbox correctly 1`] = ` margin-top: 0; position: relative; text-align: left; - user-select: none; } htmlFor="checkbox-0" > @@ -101,6 +100,7 @@ exports[`Checkbox renders Checkbox correctly 1`] = ` transition-duration: 200ms; transition-property: background, border, border-color; transition-timing-function: cubic-bezier(.4, 0, .23, 1); + user-select: none; width: 20px; } >