From f7a3f6738a77e69441f34bd7f63f9a223aba2b2e Mon Sep 17 00:00:00 2001 From: Antonin Hildebrand Date: Thu, 27 Apr 2017 18:18:35 +0200 Subject: [PATCH] devtools: console do not focus prompt when clicked on custom-expand-icon close #59 @pavelfeldman FYI^ --- .../unpacked/devtools/front_end/console/ConsoleView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/unpacked/devtools/front_end/console/ConsoleView.js b/resources/unpacked/devtools/front_end/console/ConsoleView.js index 7be7afc9a7..7bcf51c027 100644 --- a/resources/unpacked/devtools/front_end/console/ConsoleView.js +++ b/resources/unpacked/devtools/front_end/console/ConsoleView.js @@ -1190,8 +1190,12 @@ Console.ConsoleView = class extends UI.VBox { */ _messagesClicked(event) { var targetElement = event.deepElementFromPoint(); - if (!targetElement || targetElement.isComponentSelectionCollapsed()) - this.focus(); + if (!targetElement || targetElement.isComponentSelectionCollapsed()) { + const isCustomExpandIcon = targetElement.classList.contains("custom-expand-icon"); + if (!isCustomExpandIcon) { // see https://github.com/binaryage/dirac/issues/59 + this.focus(); + } + } var groupMessage = event.target.enclosingNodeOrSelfWithClass('console-group-title'); if (!groupMessage) return;