Bug 158385
| Summary: | REGRESSION: $1 doesn't work in console after selecting an element in jsfiddle | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | graouts, inspector-bugzilla-changes, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ryosuke Niwa
Reproduction steps:
1. Open https://jsfiddle.net/kLtkjmLe/
2. Inspect "y" in the view
3. Type "$1"
Expected result:
I can access the selected element.
Actual result:
Get "ReferenceError: Can't find variable".
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/26639517>
Ryosuke Niwa
This was tested on the latest Safari Tech Preview.
Timothy Hatcher
You need to pick the result frame in the console context selector on the right side for $1 to work.
We should auto switch this based on the selected frame/element in the DOM tree I think. I'm pretty sure we have other bugs about this.
Ryosuke Niwa
(In reply to comment #3)
> You need to pick the result frame in the console context selector on the
> right side for $1 to work.
>
> We should auto switch this based on the selected frame/element in the DOM
> tree I think. I'm pretty sure we have other bugs about this.
I didn't know there was such a thing. I agree it would be great to automatically switch the context.