ts-ignore e.consumed
This commit is contained in:
parent
7bbc140f05
commit
08ca7a1ec7
1 changed files with 2 additions and 0 deletions
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue