Hola, estoy creando un calendario usando reactjs con Custom Drag and Drop. Tengo un problema con los móviles Ipad y Touch. mi código funciona perfectamente en el escritorio, pero si abro la herramienta de desarrollo de Chrome y cambio la resolución de pantalla a la tableta de 768px. mis eventos tampoco funcionan en él. Por favor, ayuda, he usado cursor:pointer y e.stopPropagation() en el evento principal y en el evento secundario, pero no funcionó. yo uso onTouchStart={this.handleTouchStart}
aquí está el código que estoy usando El evento principal es
Sectiondoubletap(e) { debugger var now = new Date().getTime(); var timesince = now - this.state.mylatesttap; if((timesince < 300) && (timesince > 0)){ // double tap checking this._handleDoubleClickSpaltenBody(e) console.log("Sectiondoubletap worked") } this.state.mylatesttap = new Date().getTime(); }El evento hijo es
handleTouchStart(ev) { ev.stopPropagation(); console.log("handleTouchStart"); var now = new Date().getTime(); var timesince = now - this.state.mylatesttap; // checking double tap if((timesince < 300) && (timesince > 0)){ // double tap checking this._handleDoubleClickItem(ev) console.log("Appoinmentdoubletap worked") }else{ this.handleDrag(ev); } this.state.mylatesttap = new Date().getTime(); }¿Intentaste cambiar?
e.stopPropagation()por
e.stopImmediatePropagation()