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

Fix touch events in EDGE browser #1928

Closed
vmikeska opened this issue Jan 13, 2016 · 16 comments
Closed

Fix touch events in EDGE browser #1928

vmikeska opened this issue Jan 13, 2016 · 16 comments

Comments

@vmikeska
Copy link

Touch screen functionality (moving, resizing) is not working with EDGE.
-Win 10 + EDGE
-Win 10 mobile + EDGE
-Win 8.1 mobile + IE

@bhousel
Copy link
Contributor

bhousel commented Mar 26, 2016

Cool, I'm getting a device to test this next week.

@lucaswoj lucaswoj changed the title Touch screen not working with EDGE Fix touch events in EDGE browser Jul 29, 2016
@lucaswoj lucaswoj removed the bug 🐞 label Aug 4, 2016
@mb12
Copy link

mb12 commented Aug 30, 2016

@mourner and @lucaswoj Is it possible to prioritize this or suggest a workaround to make at least panning work using touch on win 10 laptops (Edge browser only )? At the moment on Windows laptops, even simple panning does not work with touch. (Its okay if panning does not work on windows mobile.)

I am sure this should be blocking others also from switching entirely to mapbox vector base map.

@vmikeska
Copy link
Author

My original complaint was about the Mapbox JS and it seems working now in 2.4

@mourner
Copy link
Member

mourner commented Aug 30, 2016

@mb12 we will get to this eventually, but if you need this urgently, we'll appreciate a pull request!

@mb12
Copy link

mb12 commented Aug 30, 2016

@mourner Thanks for the response. I have found a workaround that does not require any changes to GL JS. javascript lets you change prototype of any class that can be used to convert pointer events to touch events. Using the workaround for now. Will wait for the official fix.

@jfirebaugh
Copy link
Contributor

Might be fixed with #4259.

@fmairesse
Copy link

A very simple fix to make the pan work:
body {
-ms-content-zooming: none;
overflow: hidden;
}

@sethb75
Copy link

sethb75 commented Sep 21, 2017

There's a very large number of Surface Pro tablets out there ... many people use touch with Edge. I have customers complaining that touch events don't work for them.

@aptogo
Copy link

aptogo commented Jan 10, 2018

I can confirm that this is still a real issue with Win 10 + EDGE (41.16299.15.0) on Surface devices and touchscreen laptops. For example, https://www.mapbox.com/mapbox-gl-js/example/center-on-symbol/ - dragging pans the entire page, pinch&zoom zooms the entire page and tapping on an icon doesn't trigger a click event.

Adding 'touch-action: none' to the body element in this example allows you to pan the map by dragging but zooming and tapping to click do not produce any response.

Is this being actively looked into?

@jfirebaugh
Copy link
Contributor

Touch events are disabled by default in Edge on touchscreen tablets such as the Surface.

MicrosoftEdge/WebAppsDocs#39
MicrosoftEdge/Status#336

@Shikakka
Copy link

Is there any fix on this? Or what files should I look at to create a fix?

@ryanhamley
Copy link
Contributor

This is currently a limitation of the Edge browser. All touch events are disabled by default in Edge as discussed in the links here #1928 (comment) Until these events are enabled in Edge, I don't think there's much we can do on our end.

@rbrundritt
Copy link

Edge uses pointer events instead of touch events. I believe Bing Maps supports pinch to zoom by using the pointer events. One option is to add a polyfill: https://github.com/CamHenlin/TouchPolyfill

@Shikakka
Copy link

Shouldn't it then be mentioned on the API or somewhere else? Just like @sethb75 said, a lot of people are using Windows tablets or touchscreen with IE11 or EDGE.

And maybe also mention a polyfill that can be used for now? The one @rbrundritt just mentioned breaks a lot of Angular 7 click functions. This one seems to be working better (at least for me) https://github.com/WebReflection/ie-touch

@rbrundritt
Copy link

Good news, the new version of Edge is available publicly for testing now here: https://www.microsoftedgeinsider.com I just tested and found that this issue is resolved in there. I believe this version of the browser is planned to be released to Windows later this year, at which point, not long after most users of Edge will likely be using that version. With this in mind, likely best to just wait for that version as likely not worth fixing something that will be irrelevant later this year.

I've done some testing and found this also resolves: #8116

@chloekraw
Copy link
Contributor

I'm inferring from #1928 (comment) that Edge now supports touch events and we can close this ticket. We can track the feature request to add support for pointer events in #8021

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