Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 1877233002: DevTools: Do not scroll the console to show the prompt when we select the console tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 851347821a0a0bdcd6a16647d46b3fa8070f14f8..302287817a3a255d9172548ca4461eff65c2cfcf 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -346,8 +346,10 @@ WebInspector.ConsoleView.prototype = {
{
if (this._promptElement === WebInspector.currentFocusElement())
return;
- WebInspector.setCurrentFocusElement(this._promptElement);
+ // Set caret position before setting focus in order to avoid scrolling
+ // by focus().
this._prompt.moveCaretToEndOfPrompt();
+ WebInspector.setCurrentFocusElement(this._promptElement);
},
restoreScrollPositions: function()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698