From bf02b2ffbfe4c07c6bd610e419dcdb106978a71c Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Wed, 27 Feb 2019 13:33:10 -0800 Subject: [PATCH] Select DOM element mode should useCapture to prevent clicks from passing through --- src/backend/agent.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/agent.js b/src/backend/agent.js index fbd306f3bb..a4716ecc71 100644 --- a/src/backend/agent.js +++ b/src/backend/agent.js @@ -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) => {