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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Replace `"unset"` styles with safer override values
- Use capture phase for `"pointerdown"` and `"pointerup"` events; this is necessary for compatibility with certain UI libraries like Blueprint JS
- Read `Panel` pixel size using `offsetWidth`/`offsetHeight` rather than `inlineSize` to avoid an edgecase bug with `ResizeObserver`

## 4.3.0

Expand Down
11 changes: 7 additions & 4 deletions lib/global/utils/notifyPanelOnResize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ export function notifyPanelOnResize(

const groupSize = calculateAvailableGroupSize({ group });

const panelSize =
group.orientation === "horizontal"
? panel.element.offsetWidth
: panel.element.offsetHeight;

const prevSize = panel.mutableValues.prevSize;
const nextSize = {
asPercentage: formatLayoutNumber(
(resizeObserverSize.inlineSize / groupSize) * 100
),
inPixels: resizeObserverSize.inlineSize
asPercentage: formatLayoutNumber((panelSize / groupSize) * 100),
inPixels: panelSize
};
panel.mutableValues.prevSize = nextSize;

Expand Down
Loading