Skip to content

[#2142] touch events handling #3150

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

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

aluarius
Copy link
Contributor

Closes: #2142

Description

  • useTouch composable implementation;
  • integration to VaDropdown;
  • useEvent composable improvement;
  • refactoring and docs updates.

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

@aluarius aluarius self-assigned this Mar 10, 2023
@aluarius aluarius changed the title Feat/2142 touch events [#2142] touch events handling Mar 10, 2023
Copy link
Contributor

@rustem-nasyrov rustem-nasyrov left a comment

Choose a reason for hiding this comment

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

  • Do hover state should work on touch?
  • Need to fix demo layout for mobile screens.
  • Missing demo for the vue-book.

image

@rustem-nasyrov rustem-nasyrov self-assigned this Mar 13, 2023
Copy link
Collaborator

@m0ksem m0ksem left a comment

Choose a reason for hiding this comment

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

touch fn too complicated because it uses useEvent inside. Must be reworked.

@@ -0,0 +1,88 @@
import { ref, onBeforeUnmount, type Ref } from 'vue'

import { useEvent, useWindow } from './'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Prefer direct import by path to prevent circular dependecies...


const cancelTouch = () => {
clearTouchTimeouts()
removeTouchCancelListeners()
Copy link
Collaborator

Choose a reason for hiding this comment

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

useEvent must be used outside of onTouchStart function and there will no be needed to add removeTouchCancelListeners...

@rustem-nasyrov rustem-nasyrov marked this pull request as draft March 21, 2023 07:51
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.

Dropdown must react different on events if it touch events
3 participants