We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e20a8f commit 90b7cd0Copy full SHA for 90b7cd0
packages/app/src/app/components/Preview/DevTools/index.tsx
@@ -326,8 +326,15 @@ export class DevTools extends React.PureComponent<Props, State> {
326
event: MouseEvent & { clientX: number; clientY: number }
327
) => {
328
if (this.state.mouseDown) {
329
- const newHeight =
330
- this.state.startHeight - (event.clientY - this.state.startY);
+ let maxHeight = 0;
+ if (this.node) {
331
+ maxHeight = this.node.parentElement.getBoundingClientRect().height;
332
+ }
333
+
334
+ const newHeight = Math.min(
335
+ maxHeight,
336
+ this.state.startHeight - (event.clientY - this.state.startY)
337
+ );
338
339
this.setState({
340
height: Math.max(this.closedHeight() - 2, newHeight),
0 commit comments