Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.6.4

- [664](https://github.com/bvaughn/react-resizable-panels/pull/664), [665](https://github.com/bvaughn/react-resizable-panels/pull/665): Resize actions sometimes "jump" on touch devices

## 4.6.3

- Fixed a problem with project logo not displaying correctly in the README for the Firefox browser.
Expand Down
10 changes: 9 additions & 1 deletion lib/components/group/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,18 @@ export function Group({
height: "100%",
width: "100%",
overflow: "hidden",

...style,

display: "flex",
flexDirection: orientation === "horizontal" ? "row" : "column",
flexWrap: "nowrap"
flexWrap: "nowrap",

// Inform the browser that the library is handling touch events for this element
// but still allow users to scroll content within panels in the non-resizing direction
// NOTE This is not an inherited style
// See github.com/bvaughn/react-resizable-panels/issues/662
touchAction: orientation === "horizontal" ? "pan-y" : "pan-x"
}}
>
{children}
Expand Down
9 changes: 8 additions & 1 deletion lib/components/panel/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export function Panel({
const {
getPanelStyles,
id: groupId,
orientation,
registerPanel,
togglePanelDisabled
} = useGroupContext();
Expand Down Expand Up @@ -176,7 +177,13 @@ export function Panel({
maxWidth: "100%",
flexGrow: 1,

...style
...style,

// Inform the browser that the library is handling touch events for this element
// but still allow users to scroll content within panels in the non-resizing direction
// NOTE This is not an inherited style
// See github.com/bvaughn/react-resizable-panels/issues/662
touchAction: orientation === "horizontal" ? "pan-y" : "pan-x"
}}
>
{children}
Expand Down
8 changes: 7 additions & 1 deletion lib/components/separator/Separator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,15 @@ export function Separator({
style={{
flexBasis: "auto",
cursor,

...style,

flexGrow: 0,
flexShrink: 0
flexShrink: 0,

// Inform the browser that the library is handling touch events for this element
// See github.com/bvaughn/react-resizable-panels/issues/662
touchAction: "none"
}}
tabIndex={disabled ? undefined : 0}
/>
Expand Down
2 changes: 1 addition & 1 deletion lib/global/cursor/updateCursorStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function updateCursorStyle(ownerDocument: Document) {
state: interactionState.state
});

const nextStyle = `*, *:hover {cursor: ${cursorStyle} !important; ${interactionState.state === "active" ? "touch-action: none;" : ""} }`;
const nextStyle = `*, *:hover {cursor: ${cursorStyle} !important; }`;
if (prevStyle === nextStyle) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-resizable-panels",
"version": "4.6.3",
"version": "4.6.4",
"type": "module",
"author": "Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)",
"contributors": [
Expand Down
Loading