зеркало из https://github.com/mozilla/gecko-dev.git
Bug 732350 - [b2g] Cancel the click event sooner when panning has started to prevent unexpected clicks r=fabrice
This commit is contained in:
Родитель
7303be8ad0
Коммит
221b9313a7
|
@ -181,7 +181,10 @@ const ContentPanning = {
|
|||
case 'click':
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
evt.target.removeEventListener('click', this, true);
|
||||
|
||||
let target = evt.target;
|
||||
let view = target.defaultView || target.ownerDocument.defaultView;
|
||||
view.removeEventListener('click', this, true, true);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -213,8 +216,11 @@ const ContentPanning = {
|
|||
|
||||
let pan = KineticPanning.isPan();
|
||||
let click = evt.detail;
|
||||
if (click && (pan || this.preventNextClick))
|
||||
evt.target.addEventListener('click', this, true);
|
||||
if (click && (pan || this.preventNextClick)) {
|
||||
let target = evt.target;
|
||||
let view = target.defaultView || target.ownerDocument.defaultView;
|
||||
view.addEventListener('click', this, true, true);
|
||||
}
|
||||
|
||||
this.preventNextClick = false;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче