Skip to content

Commit

Permalink
Merge pull request #66 from /issues/64
Browse files Browse the repository at this point in the history
Disable Panel pointer-events during resize
  • Loading branch information
bvaughn authored Jan 5, 2023
2 parents 5cfd0d2 + 4cac9e6 commit bbb7b80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react-resizable-panels/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.0.29
* [#58](https://github.com/bvaughn/react-resizable-panels/pull/58): Add imperative `collapse`, `expand`, and `resize` methods to `Panel`.
* [#64](https://github.com/bvaughn/react-resizable-panels/pull/64): Disable `pointer-events` inside of `Panel`s during resize. This avoid edge cases like nested iframes.
* [#57](https://github.com/bvaughn/react-resizable-panels/pull/57): Improve server rendering check to include `window.document`. This more closely matches React's own check and avoids false positives for environments that alias `window` to some global object.

## 0.0.28
Expand Down
6 changes: 5 additions & 1 deletion packages/react-resizable-panels/src/PanelGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ export function PanelGroup({

// Without this, Panel sizes may be unintentionally overridden by their content.
overflow: "hidden",

// Disable pointer events inside of a panel during resize.
// This avoid edge cases like nested iframes.
pointerEvents: activeHandleId !== null ? "none" : undefined,
};
},
[direction, sizes]
[activeHandleId, direction, sizes]
);

const registerPanel = useCallback((id: string, panel: PanelData) => {
Expand Down

1 comment on commit bbb7b80

@vercel
Copy link

@vercel vercel bot commented on bbb7b80 Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.