Closed Bug 988278 Opened 11 years ago Closed 10 years ago

DevTools: Inspector: First ESC after cmd+opt+c shortcut should cancel element picking, second ESC should open split console

Categories

(DevTools :: Inspector, defect, P1)

x86
macOS
defect

Tracking

(firefox40 fixed)

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: thomas, Assigned: pbro)

References

(Blocks 1 open bug)

Details

(Whiteboard: [polish-backlog][difficulty=easy])

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140314220517

Steps to reproduce:

1. Open the Inspector
2. Press escape



Actual results:

Nothing


Expected results:

Like the other panels, the split console is opened when the escape key is pressed after directly opening the panel from the menu item / keyboard shortcut.

When the Inspector panel is directly opened the user has to 
1. focus the the panel and
2. press escape twice before the split console is opened.
This is in nightly btw. Works as expected in version 28
(ref. user-agent info in initial comment)
Component: Untriaged → Developer Tools
Component: Developer Tools → Developer Tools: Inspector
I've checked by opening inspector with keyboard shortcut and by right click -> Inspect element, and in both cases the split console seems to open on the first Escape keypress with no extra actions needed.  Do you have any more info to reproduce?
Using nightly 31.0a1 (2014-03-24) (OS-X)

1. Start the browser
2. From any webpage, press Alt+Cmd+C
3. Press the escape key

Result: split console is not opened.

4. Focus the panel. Eg. click/select on the body tag in the tree
5. Press the escape key
6. Press the escape key

Result: split console always opens the second time the escape key is pressed.

If I change #2 to be eg. Network monitor (Alt+Cmd+Q), the escape key opens the split console on the first escape key press.
Same with Debugger and Style Editor etc.

It does not matter if I am using a clean profile or not.

hm, it is probably not related but when I update the 31.0a1 (2014-03-24) nightly build from the About dialog it always stays on 31.0a1 (2014-03-24).

I can try to delete my nightly and download it from scratch.
Same result with nightly 31.0a1 (2014-03-27).
(In reply to Thomas Andersen from comment #3)
> Using nightly 31.0a1 (2014-03-24) (OS-X)
> 
> 1. Start the browser
> 2. From any webpage, press Alt+Cmd+C
> 3. Press the escape key
> 
> Result: split console is not opened.
> 
> 4. Focus the panel. Eg. click/select on the body tag in the tree
> 5. Press the escape key
> 6. Press the escape key
> 
> Result: split console always opens the second time the escape key is pressed.
> 
> If I change #2 to be eg. Network monitor (Alt+Cmd+Q), the escape key opens
> the split console on the first escape key press.
> Same with Debugger and Style Editor etc.
> 
> It does not matter if I am using a clean profile or not.
> 
> hm, it is probably not related but when I update the 31.0a1 (2014-03-24)
> nightly build from the About dialog it always stays on 31.0a1 (2014-03-24).
> 
> I can try to delete my nightly and download it from scratch.

OK, so this is an issue when opening with cmd+opt+c (which opens inspector in the inspect element mode).  The behavior I expect following these steps would be that the first escape cancels the element selection, and the second escape opens the split console on the inspector panel.  So this is currently not working as expected.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: DevTools: Inspector: Inconsistent split console behavior → DevTools: Inspector: Escape not opening split console after opening inspector with cmd+opt+c shortcut
Sorry if my explanation was convoluted or something.

> OK, so this is an issue when opening with cmd+opt+c 

From further investigation, this happens when:

1. Cmd+Alt+C shortcut is used.
2. Tools -> Web Developer -> Inspector menu item is chosen.

This does is _not an issue if I context click an element and choose Inspect Element from the context menu.
Summary: DevTools: Inspector: Escape not opening split console after opening inspector with cmd+opt+c shortcut → DevTools: Inspector: Pressing ESC after cmd+opt+c shortcut should cancel element picking
This is an issue even if element picking is initialized after pressing the button in the UI.  I believe this will be resolved by Bug 1120111.
Depends on: 1120111
Summary: DevTools: Inspector: Pressing ESC after cmd+opt+c shortcut should cancel element picking → DevTools: Inspector: First ESC after cmd+opt+c shortcut should cancel element picking, second ESC should open split console
Once the first ESC is cancels element picking, we need to make sure that the inspector is properly focused so that the second ESC opens the split console.  This may actually work after 1120111, since cmd+opt+I seems to work as expected already, but we should double check once it lands.
I can reproduce the second part of this bug (after clearing the picking mode) with the following steps:

Open the inspector on any page
Click on an element in the markup view
Press ESC (nothing happens)
Press ESC a second time (split console opens)

At this point it only takes a single ESC to toggle split console on/off, but the first time is a problem.
After 1120111 has landed, the first ESC now cancels element picking correctly, but the second one still doesn't open up the split console.
Whiteboard: [devedition-40]
Agreed - we need to both cancel the highlighter *and* set focus on the toolbox. The user is using a tool, if they cancel out of that by hitting escape focus should go back to the toolbox they launched the tool from.
Assigning P1 priority for some devedition-40 bugs. 

Filter on '148DD49E-D162-440B-AE28-E22632FC20AC'
Priority: -- → P1
Whiteboard: [devedition-40] → [devedition-40][difficulty=easy]
To sum up, there are 2 issues to fix:
- When in pick mode, the first ESC cancels the selection (works today), but the second ESC should open the split console -> This doesn't work because the toolbox isn't focused.
- When opening the inspector and clicking on a node in the tree, it takes 2 ESC to open the split console the first time.
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Attached file MozReview Request: bz://988278/pbrosset (obsolete) (deleted) —
/r/6867 - Bug 988278 - Fixes ESCape keypress mess in the inspector to make sure the split console opens; r=miker

Pull down this commit:

hg pull -r f9c3d39bc84ecdf43b2c07795e8330dce65a9656 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8590843 - Flags: review?(mratcliffe)
Comment on attachment 8590843 [details]
MozReview Request: bz://988278/pbrosset

https://reviewboard.mozilla.org/r/6865/#review5725

Ship It!
Attachment #8590843 - Flags: review?(mratcliffe) → review+
https://hg.mozilla.org/mozilla-central/rev/67683aaa2041
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Attachment #8590843 - Attachment is obsolete: true
Attachment #8618104 - Flags: review+
Whiteboard: [devedition-40][difficulty=easy] → [polish-backlog][difficulty=easy]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: