Select DOM element mode should useCapture to prevent clicks from passing through

This commit is contained in:
Brian Vaughn
2019-02-27 13:33:10 -08:00
parent 05ef0ad7dc
commit bf02b2ffbf
+6 -6
View File
@@ -177,17 +177,17 @@ export default class Agent extends EventEmitter {
};
startInspectingDOM = () => {
window.addEventListener('click', this._onClick);
window.addEventListener('mousedown', this._onMouseDown);
window.addEventListener('mouseover', this._onMouseOver);
window.addEventListener('click', this._onClick, true);
window.addEventListener('mousedown', this._onMouseDown, true);
window.addEventListener('mouseover', this._onMouseOver, true);
};
stopInspectingDOM = () => {
hideOverlay();
window.removeEventListener('click', this._onClick);
window.removeEventListener('mousedown', this._onMouseDown);
window.removeEventListener('mouseover', this._onMouseOver);
window.removeEventListener('click', this._onClick, true);
window.removeEventListener('mousedown', this._onMouseDown, true);
window.removeEventListener('mouseover', this._onMouseOver, true);
};
viewElementSource = ({ id, rendererID }: InspectSelectParams) => {