Phonegap: How can I prevent the 'Beep'/'Vibration' when a hold touch events occurs?

StackOverflow https://stackoverflow.com/questions/23245170

  •  08-07-2023
  •  | 
  •  

문제

The application loses most of it's functionality because it has this default feature when a touch event is hold. Is there a way to prevent this behaviour using an existing plugin?

도움이 되었습니까?

해결책

I have just put my plugin, that do what you want, into GitHub repository. (I had similar problem.) Plugin disables sounds on touch (and also click) events. Don't affect other activities or dialogs.

https://github.com/VVelda/device-feedback

PS: What vibration do you mean? Long press? That can be disabled by disabling this type of event in CSS. Use this code:

* {
    -webkit-tap-highlight-color: rgba(0,0,0,0)
} body {
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: none;
    -webkit-user-select: none
}

I don't know if -webkit-tap-highlight-color and -webkit-text-size-adjust have influence to this, probably no. But you never know.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top