Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js |
| index be61b1a8bbe8206cb165e078dad479ca8235a504..facb9938d89bac7bf0ad0911a523a2f76a57b6a9 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js |
| @@ -309,8 +309,6 @@ Console.ConsoleView = class extends UI.VBox { |
| focus() { |
| if (this._prompt.hasFocus()) |
| return; |
| - // Set caret position before setting focus in order to avoid scrolling |
| - // by focus(). |
| this._prompt.moveCaretToEndOfPrompt(); |
|
pfeldman
2017/04/25 07:29:30
We probably should no longer call moveCaretToEndOf
luoe
2017/04/25 18:11:39
You're right, this patch reintroduces the old regr
|
| this._prompt.focus(); |
| } |
| @@ -666,8 +664,11 @@ Console.ConsoleView = class extends UI.VBox { |
| */ |
| _messagesClicked(event) { |
| var targetElement = event.deepElementFromPoint(); |
| - if (!targetElement || targetElement.isComponentSelectionCollapsed()) |
| + if (!targetElement || !targetElement.enclosingNodeOrSelfWithClass('console-group')) |
|
pfeldman
2017/04/25 07:29:30
I think !targetElement.enclosingNodeOrSelfWithClas
luoe
2017/04/25 18:11:39
When there are only a few messages, clicking in th
|
| this.focus(); |
| + else if (targetElement.isComponentSelectionCollapsed()) |
| + this._prompt.focus(); |
| + |
| var groupMessage = event.target.enclosingNodeOrSelfWithClass('console-group-title'); |
| if (!groupMessage) |
| return; |