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

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

  •  08-07-2023
  •  | 
  •  

Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top