Console tab scrolls down when switching to(or from) other DevTools tab
Reported by
klesto...@gmail.com,
Apr 10 2016
|
||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Steps to reproduce the problem:
1. open Console tab in DevTools
2. run code: for(let i=0;i<100;++i){console.log(i)}
3. scroll up Console tab to top(or not to very top, just don't leave it in the bottom position)
4. switch to any other tab of DevTools by clicking other tab title with mouse or by pressing keys "Ctrl + [" or "Ctrl + ]"
5. switch back to Console tab BY MOUSE
What is the expected behavior?
scroll position in Console tab should remain the same as it was before switching to another DevTools tab
What went wrong?
Console tab scrolls to bottom when you switch back to it
Did this work before? Yes This problem occurred in one of recent versions
Chrome version: 49.0.2623.112 Channel: stable
OS Version: 10.0
Flash Version:
THIS IS VERY FRUSTRATING. Debugging turns to distress! All worked good for many years. I could freely switch from Console tab to other tab, and was sure that when I return, scroll position will remain the same. Now when I return to Console tab, I have to scroll up and find place where I was. This is madness!
I also found two things:
1. when I return to Console tab by pressing keys "Ctrl + [" or "Ctrl + ]" problem doesn't happen.
2. in Console tab, when I simply press Console tab title, it scroll to bottom.
It looks like problem is related to mouse. It probably happened was you added possibility to rearrange tabs by drag and drop.
Problem also happens in version 51.0.2704.0 canary (64-bit).
Please fix it.
,
Apr 11 2016
Hi @tkent, I've bisected this down to https://codereview.chromium.org/1437813002 Locally reverting this patch also fixes the problem. Could you please take a look?
,
Apr 12 2016
Before my change: 1. element.focus() is called. 2. It's set to document.activeElement 3. Dispatch 'focus' event 4. Set text selection in the element and scroll if there's no text selection DevTools sets text selection in focus event handler. So this step was skipped. After my change, step 3 and 4 were reversed. So scrolling happens. I checked the behavior of Firefox and Edge, and the current Blink behavior is interoperable. We need to update DevTools code.
,
Apr 12 2016
,
Apr 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a31414c359daff0ca68381b7e9625e188cdfbfbf commit a31414c359daff0ca68381b7e9625e188cdfbfbf Author: tkent <tkent@chromium.org> Date: Tue Apr 12 18:37:02 2016 DevTools: Do not scroll the console to show the prompt when we select the console tab. This CL fixes a regression by the behavior change of crrev.com/360545. We'd like to avoid text selection and scrolling in focus() by setting text selection before focus(). BUG= 602099 Review URL: https://codereview.chromium.org/1877233002 Cr-Commit-Position: refs/heads/master@{#386751} [modify] https://crrev.com/a31414c359daff0ca68381b7e9625e188cdfbfbf/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
,
Apr 13 2016
I think it worth merging this to 51 - the change is small and very useful.
,
Apr 15 2016
It seems crrev.com/386751 didn't cause bad side effect. Let's merge it.
,
Apr 15 2016
Your change meets the bar and is auto-approved for M51 (branch: 2704)
,
Apr 15 2016
Please merge your change before 5:00 PM PST on Monday (04/18) so we can take it in for next week M51 release.
,
Apr 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/198d46b2310aa09d5ac7885607d0829826a8af72 commit 198d46b2310aa09d5ac7885607d0829826a8af72 Author: Kent Tamura <tkent@chromium.org> Date: Mon Apr 18 01:39:06 2016 Merge "DevTools: Do not scroll the console to show the prompt when we select the console tab." to M51 This CL fixes a regression by the behavior change of crrev.com/360545. We'd like to avoid text selection and scrolling in focus() by setting text selection before focus(). BUG= 602099 Review URL: https://codereview.chromium.org/1877233002 Cr-Commit-Position: refs/heads/master@{#386751} (cherry picked from commit a31414c359daff0ca68381b7e9625e188cdfbfbf) Review URL: https://codereview.chromium.org/1894003002 . Cr-Commit-Position: refs/branch-heads/2704@{#86} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [modify] https://crrev.com/198d46b2310aa09d5ac7885607d0829826a8af72/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
,
Apr 19 2016
Retested the above issue on Windows 10 with chrome version '51.0.2704.19' and the behavior is still reproducible the console tab gets scroll to the bottom even when you select text. @tkent: Hey, can you please check the video below and let us know if I have missed something ? Appreciate your help. Thank you!
,
Apr 19 2016
tkent@, This issue still reproduces on Latest Canary#52.0.2712.0 as well for "Win10 Home". We are following the same steps per c#0 and could you please let us know if something is missed here? Thank you!
,
Apr 19 2016
It seems my CL fixed only a specific case. It didn't fix this completely. lushnikov@, is there a way to call a Blink C++ function from devtools/front_end code? We might need a variant of element.focus() which doesn't scroll.
,
Apr 22 2016
,
Apr 22 2016
@tkent: I apologize for the late response - i must've overlooked the e-mail. There is a way to call Blink C++ function from devtools/front_end code (@see InspectorFrontendHostAPI.js). However, there are lots of benefits when the front-end is just a WebApp, so we tend to battle all of the rendering issues with css/js.
,
Apr 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/80d0fa58f8b0277244ffab1702692fa96f6d9386 commit 80d0fa58f8b0277244ffab1702692fa96f6d9386 Author: tkent <tkent@chromium.org> Date: Fri Apr 22 23:21:36 2016 DevTools: ConsolePanel should delegate focus() to ConsoleView. ConsoleView has a special handling in focus(). Delegating defaultFocusedElement() without delegating focus() is inconsistent. BUG= 602099 Review URL: https://codereview.chromium.org/1909423002 Cr-Commit-Position: refs/heads/master@{#389295} [modify] https://crrev.com/80d0fa58f8b0277244ffab1702692fa96f6d9386/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
,
Apr 25 2016
#15, thank you for the information. Fortunately crrev.com/389295 should fix the issue without adding a native API.
,
Apr 26 2016
52.0.2716.0 canary has the fix. TEs, can you verify the fix?
,
Apr 28 2016
,
Apr 28 2016
Your change meets the bar and is auto-approved for M51 (branch: 2704)
,
Apr 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7e01e4e7339b3c93fef757eaad7b00277b3a0d75 commit 7e01e4e7339b3c93fef757eaad7b00277b3a0d75 Author: Kent Tamura <tkent@chromium.org> Date: Thu Apr 28 03:13:18 2016 Merge "DevTools: ConsolePanel should delegate focus() to ConsoleView." to M51 branch ConsoleView has a special handling in focus(). Delegating defaultFocusedElement() without delegating focus() is inconsistent. BUG= 602099 Review URL: https://codereview.chromium.org/1909423002 Cr-Commit-Position: refs/heads/master@{#389295} (cherry picked from commit 80d0fa58f8b0277244ffab1702692fa96f6d9386) Review URL: https://codereview.chromium.org/1931743002 . Cr-Commit-Position: refs/branch-heads/2704@{#282} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [modify] https://crrev.com/7e01e4e7339b3c93fef757eaad7b00277b3a0d75/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js |
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by lushnikov@chromium.org
, Apr 11 2016Status: Assigned (was: Unconfirmed)