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

feat(useDraggable): support capture option #2725

Merged
merged 7 commits into from Apr 13, 2023

Conversation

faga295
Copy link
Contributor

@faga295 faga295 commented Feb 2, 2023

closed #2724

Description

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.

packages/core/useDraggable/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

Please refactor using 103d6c0

Thanks

@faga295
Copy link
Contributor Author

faga295 commented Feb 18, 2023

Has refactored, please review again

@faga295 faga295 requested a review from antfu February 25, 2023 07:13
@faga295 faga295 requested review from vaakian and antfu and removed request for antfu and vaakian March 9, 2023 09:08
@faga295 faga295 requested a review from vaakian April 1, 2023 03:07
@antfu antfu changed the title Feat/usedraggable support use capture feat(useDraggable): support capture option Apr 13, 2023
@antfu antfu enabled auto-merge (squash) April 13, 2023 08:56
@antfu antfu merged commit 3996d44 into vueuse:main Apr 13, 2023
3 checks passed
@artel1992
Copy link

artel1992 commented Apr 23, 2023

I would recommend adding this code in case someone decides to call 'open' twice, once with 'capture' and once without it:

     if (hasOwn(_options, 'capture'))
            input.capture = _options.capture!
        else
            input.removeAttribute('capture')

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 support trigger in bubbling phase
4 participants