Closed Bug 1058167 Opened 5 years ago Closed 5 years ago

Split console command button is not active when initially opened

Categories

(DevTools :: Framework, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

Attachments

(1 file)

STR:

Open toolbox
Open split console
Close toolbox
Reopen toolbox

Notice that the split console is opened, but the command button is not active
This is because the _buildButtons call happens before the call to openSplitConsole, so the call to isChecked returns false
https://tbpl.mozilla.org/?tree=Try&rev=ff7bc5e35fcd
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8478710 - Flags: review?(jwalker)
Comment on attachment 8478710 [details] [diff] [review]
split-cmd-button.patch

Review of attachment 8478710 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/webconsole/console-commands.js
@@ -9,5 @@
>  const { gDevTools } = require("resource:///modules/devtools/gDevTools.jsm");
>  
> -const eventEmitter = new EventEmitter();
> -
> -gDevTools.on("toolbox-ready", (e, toolbox) => {

Waiting for toolbox-ready wasn't working because by then the 'split-console' event had already fired.  That's why it's been moved into the onChange handler (which is fired during buildButtons, before the split-console event fires)
Attachment #8478710 - Flags: review?(jwalker) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/8883019fca40
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/8883019fca40
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Depends on: 1060086
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.