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

fix(useDraggable): use clientX instead of pageX, close #2053 #2054

Merged
merged 2 commits into from Dec 16, 2022

Conversation

stefnotch
Copy link
Contributor

Description

Fix #2053

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

x: e.pageX - rect.left,
y: e.pageY - rect.top,
x: e.clientX - rect.left,
y: e.clientY - rect.top,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One interesting tidbit is that this pretty much assumes "position: fixed". That's also the only thing that can be implemented in a sane manner, as far as I can tell.

@stale
Copy link

stale bot commented Oct 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 6, 2022
@stefnotch
Copy link
Contributor Author

Still fixes a major bug for me

@stale
Copy link

stale bot commented Dec 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 7, 2022
@stefnotch
Copy link
Contributor Author

stefnotch commented Dec 7, 2022

The demo on the documentation site is still bugged, so I assume that this fix is still relevant.

No idea why the stale bot closed the issue, despite commenting on it. That seems like a mistake.

@stale stale bot removed the stale label Dec 7, 2022
@antfu antfu changed the title Fix #2053 fix(useDraggable): use clientX instead of pageX, close #2053 Dec 16, 2022
@antfu antfu merged commit c91867f into vueuse:main Dec 16, 2022
mvdbeek added a commit to mvdbeek/galaxy that referenced this pull request Jan 4, 2023
mvdbeek added a commit to mvdbeek/galaxy that referenced this pull request Jan 4, 2023
mvdbeek added a commit to mvdbeek/galaxy that referenced this pull request Jan 4, 2023
mvdbeek added a commit to mvdbeek/galaxy that referenced this pull request Jan 9, 2023
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

Successfully merging this pull request may close these issues.

useDraggable with scrolling
2 participants