From aea3de982a1b11bb62f7c375ee7d561a56898643 Mon Sep 17 00:00:00 2001 From: Anjula Karunarathne Date: Sun, 12 Apr 2020 14:29:00 +0530 Subject: [PATCH] Desktop: Fixes #3028: Fix Go To Anything closing when clicking inside the modal (#3029) * Fix Go To Anything closing when clicking inside the modal * Update GotoAnything.jsx * Update GotoAnything.jsx Co-authored-by: Laurent Cozic --- ElectronClient/plugins/GotoAnything.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ElectronClient/plugins/GotoAnything.jsx b/ElectronClient/plugins/GotoAnything.jsx index 2ef68e48171..f692ef886d0 100644 --- a/ElectronClient/plugins/GotoAnything.jsx +++ b/ElectronClient/plugins/GotoAnything.jsx @@ -115,12 +115,14 @@ class Dialog extends React.PureComponent { } } - modalLayer_onClick() { - this.props.dispatch({ - pluginName: PLUGIN_NAME, - type: 'PLUGIN_DIALOG_SET', - open: false, - }); + modalLayer_onClick(event) { + if (event.currentTarget == event.target) { + this.props.dispatch({ + pluginName: PLUGIN_NAME, + type: 'PLUGIN_DIALOG_SET', + open: false, + }); + } } helpButton_onClick() {