bpmn-io / bpmn-js

A BPMN 2.0 rendering toolkit and web modeler.
https://bpmn.io/toolkit/bpmn-js/
Other
8.64k stars 1.33k forks source link

Mobile click on elements not always working #449

Closed filipe202 closed 9 months ago

filipe202 commented 8 years ago

When I'm using bpmn.io in a mobile browser, clicking in an element doesn't always open the context pad. I reproduced the problem in the demo provided in google chrome using the emulator. What's not working?

zhuangxiaohui commented 5 years ago

Hello, when can you fix this problem?

nikku commented 5 years ago

We are open to contributions that improve our mobile support.

zhuangxiaohui commented 5 years ago

My English is poor, please forgive the following translation software, may be a little weird

I found this js problem: https://github.com/bpmn-io/diagram-js/blob/master/lib/features/touch/TouchInteractionEvents.js

On mobile, [click] will have 200~300 ms, so please use [tap] instead of [click] as the click event

Method 1: fastclick

A library called fastclick making, it also can avoid delay response of the click event on a mobile device, https://github.com/ftlabs/fastclick Or you can refer to this

Method 2: bind the touchend event for the element, and adde.preventDefault(); $demo.on('touchend',function(e){ $demo.hide() e.preventDefault(); }) I still know how to modify this problem, hope it is helpful to you

vcartelli commented 4 years ago

Just comment out 'click' and 'dblclick' in TouchInteractionEvents.js:


var mouseEvents = [
  'mousedown',
  'mouseup',
  'mouseover',
  'mouseout',
  // 'click',
  // 'dblclick'
];
nikku commented 4 years ago

@vcartelli Does that fix or substantially improve the mobile support? And if so, why?

If that is the case you could file a PR and we see if we can get this thing merged.

nikku commented 2 years ago

The recent bpmn-js@8.9 release ships with improved touch support. Please give it a try and report back.

aman123424 commented 1 year ago

@nikku , is this issue resolved, if not then I would like to contribute to this

prachiMeshram commented 1 year ago

@nikku is this issue resolved? If not I would like to go ahead with it.

nikku commented 1 year ago

Happy to take contributions that improve our mobile support.

TechoChat commented 1 year ago

@nikku is this issue solved ? I would like to help you out and contribute here, as I am a newbie

nikku commented 1 year ago

This issue is not resolved yet. Otherwise it would be closed.

nikku commented 9 months ago

Closing this issue. We completely removed the broken touch support with v17.0.0.