From b3bc049aa469ace58702ab2058de64ec593ea085 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Wed, 1 Feb 2023 19:26:55 -0800 Subject: [PATCH 1/2] Set overflow in both directions to hidden Otherwise a vertical scrollbar will appear when child button is clicked. --- src/components/GitStage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/GitStage.tsx b/src/components/GitStage.tsx index 3f7fe3edf..c5d5699c1 100644 --- a/src/components/GitStage.tsx +++ b/src/components/GitStage.tsx @@ -87,7 +87,7 @@ export const GitStage: React.FunctionComponent = ( itemData={props.files} itemKey={(index, data) => data[index].to} itemSize={ITEM_HEIGHT} - style={{ overflowX: 'hidden' }} + style={{ overflow: 'hidden' }} width={'auto'} > {props.rowRenderer} From 6a34bb10e4bee307564e4218767402422148e84e Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Thu, 2 Feb 2023 18:53:11 -0800 Subject: [PATCH 2/2] Move overflow: hidden to button wrapper This is the closest parent container to the button so it's more accurate --- src/components/GitStage.tsx | 2 +- src/style/FileItemStyle.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/GitStage.tsx b/src/components/GitStage.tsx index c5d5699c1..3f7fe3edf 100644 --- a/src/components/GitStage.tsx +++ b/src/components/GitStage.tsx @@ -87,7 +87,7 @@ export const GitStage: React.FunctionComponent = ( itemData={props.files} itemKey={(index, data) => data[index].to} itemSize={ITEM_HEIGHT} - style={{ overflow: 'hidden' }} + style={{ overflowX: 'hidden' }} width={'auto'} > {props.rowRenderer} diff --git a/src/style/FileItemStyle.ts b/src/style/FileItemStyle.ts index e943e65f1..d697f5a76 100644 --- a/src/style/FileItemStyle.ts +++ b/src/style/FileItemStyle.ts @@ -107,5 +107,6 @@ export const checkboxLabelContainerStyle = style({ export const checkboxLabelLastContainerStyle = style({ display: 'flex', - marginLeft: 'auto' + marginLeft: 'auto', + overflow: 'hidden' });