ol2
ol2 copied to clipboard
`buttonclick` event not triggered on Chrome Android
05de2b5 breaks in Android Chrome. For example, nothing happens when tapping the +/- zoom buttons on a Nexus 10 tablet using Android 4.4.2 and Chrome 36.0.1985.128.
My first investigation show that for that browser a single tap (in place) fires 3 events: touchstart, touchmove, touchend. In other touch capable browsers, the touchmove isn't fired.
According to the below page it should work: http://docs.openlayers.org/library/mobile.html But it not working for most of the android devices. Tested with the below Mobiles and tablets:
- Sony Z2 ----Android 4.4.2---Chrome browser----not working
- Nexus-lur----Android 4.4.4----Chrome browser----not working
- Nexus 7 tablet---Android 4.4.2---Chrome browser---- Openlayer cnotrol button onclick event doesn't fire for the first time.
- Nexus 7 tablet---Android 4.3---Chrome browser---- Openlayer cnotrol button onclick event doesn't fire for the first time.
I have the same issue on Samsung galaxy 4(Android 4.4.2) with chrome 37.0.2062.117. The zoom buttons don't fire any events. @pgiraud: Did you find any solutions(alternatives) to this ?
@emilmork nope, sorry.
@emilmork @pgiraud something new?
@jgleal Don't think so. Bu I just created custom buttons and called map.zoomIn() and map.zoomOut() manually.
@emilmork Can you please provide a working example? For me, the combination of OpenLayers.Control.Button on a OpenLayers.Control.Panel does not work on Android 4.4. What is the workaround?
@Xsasan: I am not using a OpenLayers.Control.Button or OpenLayers.Control.panel, just a custom link Zoom Inn and then calling map.zoomIn() when the link is pressed. The link is styled as a OpenLayers zoom button.
Do we have any update about that bug? Whether it is possible to solve that problem? Or will it be solved on Openlayers next release? Do we have of any dirty fix about that problem until now before there will be a master update? Thanks in advance.
I was having the problem, then when I set the "pixelTolerance" variable to 20, it fixed it. Hope this helps. Thanks.
Hi @scuzzlebuzzle, set the "pixelTolerance" doesn't works for me. Can you show me you code?
@scuzzlebuzzle @emilmork @Xsasan any news? I need patch this bug.
Can you guys please check if #1416 fixes the issue? Thanks.
@ahocevar oh! great! It works!
I couldn't test the pull request earlier. I did this morning and clicking on the buttons still don't have any effect. Same device as previously but with Chrome updated (version 39.0.2171.93). I'm testing a locally installed debug version of OpenLayers. I couldn't test the online version since mobile examples on official site are broken. http://dev.openlayers.org/examples/mobile.html
@pgiraud mmm, I've seen it. Try deleting the line 200 (++this._cancelCount).
So did we work around something that was fixed in Chrome in the meantime? Then my change can just be reverted.
Nope, the Chrome update doesn't fix the issue. If I revert the change (checkout to a previous commit), the button still behave the same (no action on map). So for the given device, the patch doesn't fix the issue unfortunately.
Finally, with the latest version of the code removing ``++this._cancelCount` as proposed by @jgleal works. https://github.com/pgiraud/openlayers/commit/9ee2619b2c5b59edb6af5afffd570134b55ceaf4