Closed Bug 1385660 Opened 8 years ago Closed 8 years ago

console problem with premature execution of new curly bracket method?

Categories

(DevTools :: Console, defect)

54 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jmichae3, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170628075643 Steps to reproduce: ctrl-shift-i then type in: if(false) { console.log(1); } else { console.log(0); } I tried opening a web page with the new curly bracket method, and it works. Actual results: console editor upon enter after an if() { console.log(1); } doesn't let you get to else after you hit Enter the last time. so I think it's a console editor bug where it executes prematurely as soon as any success comes along. multiple Enters are needed. maybe it's time to require a special key sequence like control-enter, with a text label below showing that particular functionality so user isn't lost in a manual somewhere? Expected results: should have looked for an else if I supplied one or allowed more editing somehow (button click? messy, but could work).
Summary: console problem with new curly bracket method? → console problem with premature execution of new curly bracket method?
you can paste the code in and it will be reformatted into a 1-liner and console will work.
Component: Untriaged → Developer Tools: Console
Hello Jim, I'm not sure I understand, do you mean your expression gets evaluated when you already have typed ``` if(false) { console.log(1); } ``` and then hit enter ? If so, I think it's the wanted behavior: You have a valid expression and hitting Enter will evaluate it. We only insert a new line on Enter if the expression isn't valid yet. You can do Shift + Enter to add a new line in the console. There is also Bug 1133849 which is related to that, in the sense that it would be multi-line by default (and another key shortctut/button would be use to trigger the evaluation). If you weren't describing this, could you describe more precisely what you meant ? Thanks !
Flags: needinfo?(jmichae3)
that works! and it turns out it's a standard windows key combination.
Flags: needinfo?(jmichae3)
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.