react-grid-layout icon indicating copy to clipboard operation
react-grid-layout copied to clipboard

Resizing a tile over the bottom edge of the layout does not trigger a height increase of the dashboard

Open lehnerchristian opened this issue 3 years ago • 3 comments

When I increase the height of a tile and move the cursor to the bottom edge of my dashboard the height only increases a little bit in Chromium based browsers and then stops. While I can sometimes reproduce this in Firefox it works way more reliably for me. The only way I can achieve this in Chrome is that I resize a tile until the dashboard increases a little bit, stop resizing, scroll down and then start resizing again.

Here's a Codesanbox link with a little example: https://codesandbox.io/s/chrome-rgl-scrolling-issue-hsr45?file=/src/App.js

I can also reproduce the same behavior in the simple demo example: https://react-grid-layout.github.io/react-grid-layout/examples/1-basic.html

Chrome (Sandbox example): Peek 2022-01-28 09-16

Firefox (Sandbox example): Peek 2022-01-28 09-20

Chrome (Simple demo example): Peek 2022-01-28 09-26

lehnerchristian avatar Jan 28 '22 08:01 lehnerchristian

I also encountered the same problem

fengbozhi avatar Feb 18 '22 08:02 fengbozhi

also running into this issue. any chance for an update here?

OFouda avatar May 05 '22 04:05 OFouda

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days

github-actions[bot] avatar Aug 03 '22 06:08 github-actions[bot]

I also have the same issue...anyone made a progress here?

raymar avatar Nov 17 '22 14:11 raymar

I figured it out...basically you just need to make sure, that the scroll is going down while resizing ;)

raymar avatar Nov 17 '22 17:11 raymar

Hi @raymar ! Can you go into a little bit more detail how you solved it? Did you simply use window.scrollBy(x, y) in the onResize or onResizeStart callback? I'm sure this will also help others having the same issue :slightly_smiling_face:

lehnerchristian avatar Nov 23 '22 07:11 lehnerchristian

Hi @raymar ! Can you go into a little bit more detail how you solved it? Did you simply use window.scrollBy(x, y) in the onResize or onResizeStart callback? I'm sure this will also help others having the same issue 🙂

Hi @lehnerchristian . I recently had the same problem. I solved the problem a while ago. To share, use onResize. When onResize is working, just add a window size and ref to the component being resized to compare the height(getBoundingClientRect().bottom) value of that component and hang a scrollBy event.

Junghoon-P avatar Jun 30 '23 04:06 Junghoon-P