From ee0c978d4ee84ca8001abe6d963d123382c8f386 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Tue, 5 Dec 2023 11:48:33 -0600 Subject: [PATCH 1/2] fix(PageLayout): update onMouseDown to check which button is pressed --- src/PageLayout/PageLayout.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/PageLayout/PageLayout.tsx b/src/PageLayout/PageLayout.tsx index 378d8fe8c3d..7b18f7bf0b4 100644 --- a/src/PageLayout/PageLayout.tsx +++ b/src/PageLayout/PageLayout.tsx @@ -352,9 +352,11 @@ const VerticalDivider: React.FC { - setIsDragging(true) - onDragStart?.() + onMouseDown={event => { + if (event.button === 0) { + setIsDragging(true) + onDragStart?.() + } }} onKeyDown={event => { if ( From ba04adb465d4c540f3300e161b95b05a22489930 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Tue, 5 Dec 2023 11:49:05 -0600 Subject: [PATCH 2/2] chore: add changeset --- .changeset/warm-sloths-tickle.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-sloths-tickle.md diff --git a/.changeset/warm-sloths-tickle.md b/.changeset/warm-sloths-tickle.md new file mode 100644 index 00000000000..1a300487110 --- /dev/null +++ b/.changeset/warm-sloths-tickle.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Update the resize behavior of PageLayout to ignore right clicks when resizing