Skip to content

Trying to resize panel throws getBoundingClientRect error #112

Closed
@prvnbist

Description

@prvnbist

Describe the bug
The error is consistent with any type of resize panel i.e LeftResizable, RightResizable etc. Clicking on the resize handle itself throws this error. A demo can be checkout out on codesandbox.

import { BottomResizable, Fill, LeftResizable, ViewPort } from "react-spaces";

import "./styles.css";

export default function App() {
  return (
    <ViewPort top="48px" bottom="32px">
      <LeftResizable size={280} minimumSize={280} maximumSize={380}>
        Left Sidebar
      </LeftResizable>
      <Fill>
        <Fill>Top Area</Fill>
        <BottomResizable
          size="380px"
          minimumSize="240px"
          maximumSize={window.innerHeight - 280}
        >
          Bottom Area
        </BottomResizable>
      </Fill>
    </ViewPort>
  );
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to codesandbox
  2. Click on any resize handle
  3. See error

Expected behavior
Expect it not throw any error while resizing.

Package versions (please complete the following information):

  • React version: [18.0.0]
  • React spaces version: [0.3.2]

Code sandbox link
codesandbox

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions