Skip to content

Commit

Permalink
devtools: console do not focus prompt when clicked on custom-expand-icon
Browse files Browse the repository at this point in the history
close #59

@pavelfeldman FYI^
  • Loading branch information
darwin committed Apr 27, 2017
1 parent 0cdada7 commit f7a3f67
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions resources/unpacked/devtools/front_end/console/ConsoleView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f7a3f67

Please sign in to comment.