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

attribute values incorrect when drag goes off window before mouseup #441

Open
ThomasGreenspan opened this issue Dec 17, 2024 · 0 comments
Open

Comments

@ThomasGreenspan
Copy link

Hi, great library, thanks so much for your work on it!

This is pretty small but I noticed that the values for a few data attributes seem to not update correctly in an edge case where the handle is dragged and the mouse goes off of the window before releasing. This is at least true for data-resize-handle-state and data-resize-handle-active but it could be true for others as well (don't know enough to verify).

To reproduce

simply drag a resize handle and, before letting go, move your mouse off of the window, then release. This occurs with your sandbox example.

Details

One particularity which hopefully will make sense to you: I am seeing different behavior in different environments.

  • in your sandbox example, the values simply do not update when released out of the window (at least on chrome where I tried it)
  • in electron (where I am mostly working), the data-resize-handle-active disappears as expected on mouseup, but the data-resize-handle-state changes from 'drag' to 'hover' instead of changing to 'inactive'.

In all cases, the values immediately correct themselves the second the mouse reenters the window

At a very quick glance may be related to issue #368 but not sure.

Very small nit so I'm hoping it's an easy fix if there is one

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

No branches or pull requests

1 participant