New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 626415 link

Starred by 35 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Console context should be top by default

Reported by maxkfr...@gmail.com, Jul 7 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
1. Open the dev tools
2. Open the console
3. Note that the dropdown for the context is not always top by default.  It seems random if there are extensions installed.

Extensions : Enpass, Flashcontrol, uBlock Origin

What is the expected behavior?
It should always open in the top context.  If I want a specific context, I'll select it.  Top should always be default.

What went wrong?
Top is not set by default.

Did this work before? Yes This seemed to work fine in previous versions <=v45?

Chrome version: 51.0.2704.103  Channel: n/a
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

It's really annoying
 
Owner: l...@chromium.org

Comment 2 by l...@chromium.org, Jul 7 2016

Status: Assigned (was: Unconfirmed)
I also see this unwanted behavior sometimes.  Top by default, unless changed by the user would be better.  Thanks for the report.

Related: #609534
No problem.  Saving the dropdown state makes sense.

Comment 4 by l...@chromium.org, Jul 7 2016

I can consistently reproduce this on Mac Canary 54.0.2788.0, but not on Mac Stable (51.0.2704.103):
(1) Open Chrome with extensions installed
(2) Go to a site that includes an iframe (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
(3) Right click on an element that is not an iframe, click 'inspect element'
(4) Go to console, observe the context is not 'top'

maxkfranz@, could you let us know if the problem occurs,
- on Chrome Canary?
- on sites without an iframe?
- when DevTools is opened in a way without doing 'inspect element'

It will really help us out if you could provide us repro steps for this problem.  Please let us know if the problem only happens in the repro conditions above, or if you can confirm there are other bad cases as well.  Thanks!

Comment 5 by l...@chromium.org, Jul 8 2016

Cc: dgozman@chromium.org
Labels: Needs-Feedback
Owner: einbinder@chromium.org
einbinder@ this might be a duplicate of one of your context bugs

Comment 6 by l...@chromium.org, Jul 8 2016

Cc: l...@chromium.org
I'll confirm/reproduce on canary and stable with a minimal set of factors and steps. 

I know this happens on multiple machines (mac os latest)

It happens without inspect element and iframes.
Status: Started (was: Assigned)
I can confirm this happens in Chrome on my Macbook at home, and it also happens on my work machine: 
- Chrome: Version 51.0.2704.106 m 
- OS: Windows 7 Pro SP1
Not sure which exact versions I have on the Macbook, but the OS is El Capitan (10.11) and I updated Chrome fairly recently.

I usually open the JS console via hotkey (ctrl-shift-J on Windows and cmd-opt-j on OS X). I just tried it on this page, and it opened with the focus on one of my add-ons. I closed the tools, tried again with "inspect element," and it opened on the "top" frame. Interestingly, I then closed it again, opened it once more with the hotkey, and the focus was BACK to the add-on frame.

Behavior on OSX is about the same. I never saw this problem on either platform until a recent update, but it's hard to say which one. I feel like I first noticed it around 2 weeks ago, but I'm not sure what version I was on before that.


Project Member

Comment 10 by bugdroid1@chromium.org, Jul 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a9d978d3de0281a9164f7b4d9e69e75d81f581b

commit 1a9d978d3de0281a9164f7b4d9e69e75d81f581b
Author: einbinder <einbinder@chromium.org>
Date: Wed Jul 13 02:54:11 2016

DevTools: Sort execution contexts in nested frames

BUG= 626415 

Review-Url: https://codereview.chromium.org/2136763002
Cr-Commit-Position: refs/heads/master@{#404935}

[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/http/tests/inspector/console-show-all-messages.html
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/http/tests/inspector/workspace-test.js
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/execution-context-sorted-expected.txt
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/execution-context-sorted.html
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/last-execution-context-expected.txt
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/last-execution-context.html
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/resources/execution-context-iframe1.html
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/resources/execution-context-iframe2.html
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 13 2016

Labels: merge-merged-2795
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a9d978d3de0281a9164f7b4d9e69e75d81f581b

commit 1a9d978d3de0281a9164f7b4d9e69e75d81f581b
Author: einbinder <einbinder@chromium.org>
Date: Wed Jul 13 02:54:11 2016

DevTools: Sort execution contexts in nested frames

BUG= 626415 

Review-Url: https://codereview.chromium.org/2136763002
Cr-Commit-Position: refs/heads/master@{#404935}

[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/http/tests/inspector/console-show-all-messages.html
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/http/tests/inspector/workspace-test.js
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/execution-context-sorted-expected.txt
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/execution-context-sorted.html
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/last-execution-context-expected.txt
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/last-execution-context.html
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/resources/execution-context-iframe1.html
[add] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/LayoutTests/inspector/sources/resources/execution-context-iframe2.html
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
[modify] https://crrev.com/1a9d978d3de0281a9164f7b4d9e69e75d81f581b/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js

Status: Fixed (was: Started)
Issue 624471 has been merged into this issue.

Comment 14 by sdy@chromium.org, Aug 14 2016

This doesn't appear to be fixed for me in Canary (54.0.2829.0). Thoughts?

1. Go to a simple website, like istheinternetdown.com.
2. Open the console. An extension context may be selected.
3. Reload. Now top is selected.

See attached screen recording.
console_context.mov
8.4 MB Download
Cc: kozyatinskiy@chromium.org einbinder@chromium.org
 Issue 635928  has been merged into this issue.
Seems to be OK on

Chrome 54.0.2838.0 canary (64-bit) Mac OS 10.11.5

I tried with several extensions, and I couldn't replicate the bug anymore.

Comment 18 by l...@chromium.org, Sep 16 2016

 Issue 647800  has been merged into this issue.
 Issue 628412  has been merged into this issue.
Cc: pwnall@chromium.org
 Issue 637618  has been merged into this issue.

Comment 21 by tv...@c.snap.com, Feb 2 2018

I am still able to reproduce this issue as of Chrome 63.0.3239.132. Nearly every page will display some other sub-frame and not the top frame in the console consistently.

Comment 22 by l...@chromium.org, Feb 2 2018

Labels: -Needs-Feedback
comment #21: It sounds like your description is captured in one of the cases in  https://crbug.com/785692 

This issue of the "wrong selected context" for frames started reoccurring once out-of-process-iframes rendered in DevTools as separate DOM trees.  A fix was landed in M66+ (currently canary) so it should be addressed.

If you are still able to reproduce the issue on Canary, please let us know.

Sign in to add a comment