ignore clicking on root

This commit is contained in:
Bruno Windels 2019-02-27 23:21:16 +01:00
parent 7903ae0001
commit 80eac6e48d

View file

@ -60,6 +60,9 @@ export default class ListView {
} }
_onClick(event) { _onClick(event) {
if (event.target === this._root) {
return;
}
let childNode = event.target; let childNode = event.target;
while (childNode.parentNode !== this._root) { while (childNode.parentNode !== this._root) {
childNode = childNode.parentNode; childNode = childNode.parentNode;