mapbox-gl-js version: 0.52.0
browser: macOS Chrome Version 71.0.3578.98 (Official Build) (64-bit)
https://jsfiddle.net/ParryQiu/hnkwqfue/12/
console out put error:
vendor.js:51848 ERROR TypeError: Cannot read property 'x' of null
at a.equals (vendor.js:18268)
at HTMLDivElement.<anonymous> (vendor.js:18272)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2745)
at Object.onInvokeTask (vendor.js:53986)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2744)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (polyfills.js:2517)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (polyfills.js:2820)
at invokeTask (polyfills.js:4066)
at HTMLDivElement.globalZoneAwareCallback (polyfills.js:4092)
at Map.<anonymous> (main.js:7314)
Because startPos set when onMouseDown is triggered(bind_handlers.js#L155, L60). So, if click is triggered programatically, startPos is not set, then throw Error.
@cs09g good find! Want to submit a PR with the fix?
@mourner sure :) but I'm off about a week for holiday so, it would be taking a week.
@cs09g Thanks very much, I fixed this issue in local repository.
After doing some testing, consider submitting a PR.
@ParryQiu Are you able to commit the fix?
+1 - having the exact same issue on v 0.53.1 and only seeing it when triggering a marker click programmatically.
Most helpful comment
@cs09g
https://github.com/mapbox/mapbox-gl-js/pull/8049