Skip to content
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

Dragable annotations not working on touch devices #13736

Closed
PadWorks opened this issue Jun 17, 2020 · 3 comments
Closed

Dragable annotations not working on touch devices #13736

PadWorks opened this issue Jun 17, 2020 · 3 comments

Comments

@PadWorks
Copy link

Expected behaviour

Annotations should be moved on touch devices when option draggable is set.

Actual behaviour

Dragging of annotations is not possible on touch devices (tested on Windows10, Apple and Android devices)

Live demo with steps to reproduce

https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/annotations/draggable/

Product version

Highcharts .NET v8.0.4 and v8.1.2

@highsoft-bot highsoft-bot added this to To do in Development-Flow Jun 17, 2020
@KacperMadej
Copy link

Hi @PadWorks

Thank you for reporting the problem.
This is a bug and probably a part of #13420

Internal note:
After remote debugging of Chrome on Android:
For a touch device (Android) an event is emitted and nothing happens here:

fireEvent(emitter, 'drag', e);

because it doesn't match the added event here:

addEvent(emitter, H.isTouchDevice ? 'touchmove' : 'drag', emitter.onDrag);

Those two don't match, but I am not sure which one should be fixed - @Izothep ?

@Izothep
Copy link
Contributor

Izothep commented Jun 22, 2020

@KacperMadej Removing

addEvent(emitter, H.isTouchDevice ? 'touchmove' : 'drag', emitter.onDrag); 

and using

addEvent(emitter, 'drag', emitter.onDrag); 

Is not causing issues on iOS devices. Could you please confirm on Android? If yes, the solution is to change this simple line.

@KacperMadej
Copy link

@Izothep
Works fine on Adroid ( tested useing https://jsfiddle.net/BlackLabel/wrdo2s8L/ ) 👍
Adding the label for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants