Bug 1651033 - Prevent default for pointerup/down events with DevTools node picker r=gl

Differential Revision: https://phabricator.services.mozilla.com/D86502
This commit is contained in:
Julian Descottes 2020-08-10 14:37:50 +00:00
Родитель 0636e8e389
Коммит a0acf13c9c
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -1109,6 +1109,8 @@ const AccessibleWalkerActor = ActorClassWithSpec(accessibleWalkerSpec, {
target.addEventListener("dblclick", this._preventContentEvent, true); target.addEventListener("dblclick", this._preventContentEvent, true);
target.addEventListener("keydown", this.onKey, true); target.addEventListener("keydown", this.onKey, true);
target.addEventListener("keyup", this._preventContentEvent, true); target.addEventListener("keyup", this._preventContentEvent, true);
target.addEventListener("pointerup", this._preventContentEvent, true);
target.addEventListener("pointerdown", this._preventContentEvent, true);
}, },
/** /**
@ -1133,6 +1135,8 @@ const AccessibleWalkerActor = ActorClassWithSpec(accessibleWalkerSpec, {
target.removeEventListener("dblclick", this._preventContentEvent, true); target.removeEventListener("dblclick", this._preventContentEvent, true);
target.removeEventListener("keydown", this.onKey, true); target.removeEventListener("keydown", this.onKey, true);
target.removeEventListener("keyup", this._preventContentEvent, true); target.removeEventListener("keyup", this._preventContentEvent, true);
target.removeEventListener("pointerup", this._preventContentEvent, true);
target.removeEventListener("pointerdown", this._preventContentEvent, true);
this._resetStateAndReleaseTarget(); this._resetStateAndReleaseTarget();
}, },

Просмотреть файл

@ -250,6 +250,8 @@ class NodePicker {
target.addEventListener("dblclick", this._preventContentEvent, true); target.addEventListener("dblclick", this._preventContentEvent, true);
target.addEventListener("keydown", this._onKey, true); target.addEventListener("keydown", this._onKey, true);
target.addEventListener("keyup", this._preventContentEvent, true); target.addEventListener("keyup", this._preventContentEvent, true);
target.addEventListener("pointerup", this._preventContentEvent, true);
target.addEventListener("pointerdown", this._preventContentEvent, true);
this._setSuppressedEventListener(this._onSuppressedEvent); this._setSuppressedEventListener(this._onSuppressedEvent);
} }
@ -267,6 +269,8 @@ class NodePicker {
target.removeEventListener("dblclick", this._preventContentEvent, true); target.removeEventListener("dblclick", this._preventContentEvent, true);
target.removeEventListener("keydown", this._onKey, true); target.removeEventListener("keydown", this._onKey, true);
target.removeEventListener("keyup", this._preventContentEvent, true); target.removeEventListener("keyup", this._preventContentEvent, true);
target.removeEventListener("pointerup", this._preventContentEvent, true);
target.removeEventListener("pointerdown", this._preventContentEvent, true);
this._setSuppressedEventListener(null); this._setSuppressedEventListener(null);
} }