Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with scroll when resizing event #2423

Open
5 tasks done
endeavourC opened this issue Jul 19, 2023 · 2 comments
Open
5 tasks done

Problem with scroll when resizing event #2423

endeavourC opened this issue Jul 19, 2023 · 2 comments
Labels

Comments

@endeavourC
Copy link

endeavourC commented Jul 19, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://jquense.github.io/react-big-calendar/examples/index.html?path=/docs/addons-drag-and-drop--example-2

Bug description

As we can see in example we have problem with scroll, there are some "lags" and "shifting"/"jumps" (hard to explain) when we want to resize event to top or bottom. And due to this fact, we cannot smoothly with good experience resize an event.

Expected Behavior

No response

Actual Behavior

No response

react-big-calendar version

1.8.1

React version

18

Platform/Target and Browser Versions

Google Chrome

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@endeavourC endeavourC added the bug label Jul 19, 2023
@winterberryice
Copy link

hey @cutterbl I have made some git bisecting to investigate this issue, here is what I find out:

last working version for this problem was v1.6.4
commit that introduced this issue was d1c5085 #2230

issue only happens when event is larger than calendar height (or user tries to resize event to make it bigger than calendar height)

I'm not familiar wit codebase but problem is in updateParentScroll function because it sets top edge of event to top of calendar view-port

There is also a duplicate issue filed for this bug #2437

hope this info will help to fix this problem

@benasher44
Copy link

benasher44 commented Dec 12, 2023

@cutterbl @AmitRDesai #2230 really should have been behind the enableAutoScroll flag. The resulting implementation is somewhat un-intuitive, seeing as the scroll to top is very sensitive. Most controls increase scroll to top/bottom speed as you drag closer to the edge, whereas the scroll speed here is static (or at least feels that way) (unsure there is a way to get the sensitivity gradient just right in pure JS).

I'm having a bit of trouble threading the enableAutoScroll prop through from the Calendar component to this one, but it would be much appreciated if there was a way to disable this behavior. As it's currently implemented, the sensitivity/jumpiness means that the predictability is preferred over having the auto-scroll behavior zoom your even to the top (or worse, quickly adjusting the event's size during the scroll to the top).

For now, I'm relying on yarn patch to comment out this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants