You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mapbox-gl-js version: 0.43.2 but almost certainly any mapbox-gl-draw version: 1.05, git:master
Steps to Trigger Behavior
Use the draw controls
Press a key while editing a polygin
Expected Behavior
Either nothing, or an action related to the current mode
Actual Behavior
Stacktrace:
Caught a global error: message=event.srcElement is undefined
customError.ts:5:4
ERROR
TypeError
columnNumber: 1
fileName: "http://localhost:8100/build/vendor.js"
lineNumber: 186433
message: "event.srcElement is undefined"
stack: "module.exports/events.keydown@http://localhost:8100/build/vendor.js:186433:1\nF</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15649\nonInvokeTask@http://localhost:8100/build/vendor.js:5114:24\nF</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15562\nF</c</r.prototype.runTask@http://localhost:8100/build/polyfills.js:3:10815\nF</h</e.invokeTask@http://localhost:8100/build/polyfills.js:3:16787\np@http://localhost:8100/build/polyfills.js:2:27646\nv@http://localhost:8100/build/polyfills.js:2:27893\n"
__proto__: Object { stack: "", … }
which I tracked down to the following code in src/events.js :
events.keydown = function(event) {
if (event.srcElement.classList[0] !== 'mapboxgl-canvas') return; // we only handle events on the map
if ((event.keyCode === 8 || event.keyCode === 46) && ctx.options.controls.trash) {
mapbox-gl-js version: 0.43.2 but almost certainly any
mapbox-gl-draw version: 1.05, git:master
Steps to Trigger Behavior
Expected Behavior
Either nothing, or an action related to the current mode
Actual Behavior
Stacktrace:
which I tracked down to the following code in
src/events.js
:but srcElement is not recognised on Firefox: see https://developer.mozilla.org/en-US/docs/Web/API/Event/srcElement
I have a patch, will submit shortly.
The text was updated successfully, but these errors were encountered: