react-rnd icon indicating copy to clipboard operation
react-rnd copied to clipboard

[BUG] Incorrect top border in window mode

Open altro3 opened this issue 4 years ago • 0 comments

It's a bug.

Overview of the problem

I'm using react-rnd 10.1.10* [x.x.x]

My browser is: Chrome / Firefox

Reproduced project

https://github.com/altro3/window-bug

In sandbox: https://codesandbox.io/s/tender-lovelace-6rhff

Description

Problem with top window bound, when I scroll down page. If I view midlle or bottom page, top border of draggable window is changing and I can't move it to upper corners.

Steps to Reproduce

  1. You can try to move draggable element - it works perfectly
  2. Scroll down to middle or to bottom of the page
  3. Try to move draggable element to top border

Expected behavior

The dragged element should move to the top of the browser with any scroll position.

Actual behavior

The dragged element can't move to the top of the browser, if page scrolled, because was mistake in calculations of top border coordinates

altro3 avatar May 17 '20 10:05 altro3