Merge branch 'master' of github.com:pietervdvn/MapComplete

This commit is contained in:
Pieter Vander Vennet 2020-07-24 15:52:42 +02:00
commit 669caea7b3

View file

@ -54,10 +54,12 @@ export abstract class UIElement {
if (this._onClick !== undefined) { if (this._onClick !== undefined) {
const self = this; const self = this;
element.onclick = (e) => { element.onclick = (e) => {
// @ts-ignore
if(e.consumed){ if(e.consumed){
return; return;
} }
self._onClick(); self._onClick();
// @ts-ignore
e.consumed = true; e.consumed = true;
} }
element.style.pointerEvents = "all"; element.style.pointerEvents = "all";