5

I was moving the Execute Anonymous window and accidentally placed it above the outer margin of the Dev Console. Now because I am no longer in the act of moving the small window I am unable to click on its title bar and move it back down because the Dev Console's header is blocking me. What should I do ? I am able to resize the anonymous window a number of ways but the only way to actually move it is by using the handlebars that appear in the title section.

enter image description here

5
  • 1
    Closing and reopening the developer console reset the position for me.
    – Avinash
    Commented Jul 12, 2018 at 16:45
  • 1
    Just Refresh the Dev Console and It will do the Trick :)
    – Amit Singh
    Commented Jul 12, 2018 at 16:46
  • Are you sure ? There must be better way. What I am really looking for is a hotkey combination to memorize or, possibly, a long and involved update process.
    – MadMax
    Commented Jul 12, 2018 at 16:49
  • 1
    @madmax Unfortunately, once you put a window in a position like that, you can't get it back without a refresh or close/open cycle.
    – sfdcfox
    Commented Jul 12, 2018 at 18:20
  • 1
    Back in the day, you used to be able to hold Shift while closing a window and it kept the position... If you're thinking about the hotkey to pop the control menu, in some windows it's Ctrl-Space, and I believe F10 hits up the menu bar via keyboard.. Possibly none applicable here, but there you go...
    – CRT
    Commented Dec 30, 2020 at 23:48

2 Answers 2

7

All the Developer Console settings are stored in the IDEWorkspace records, including the positioning of any windows. So if you ever get into an irrecoverable issue with the dev console just delete those records with something like workbench or change the User.WorkspaceId to reset it.

Recovering the execute anonymous window position from an active session will require a lighter touch.

My execute anonymous window seems to consistently have the ID window-1183, but that might just be because it was the first window I opened. Anyway, with that we can force it back into viewable space with JavaScript.

document.getElementById('window-1183').style["top"] = "10px";

Taking it a step further, you could look for any x-window that is off the top of the screen.

Array.from(document.getElementsByClassName("x-window")).forEach(
    function(element, index, array) {
        var top =  parseInt(element.style["top"]);
        console.log(top);
        if(top < 0) {
            element.style["top"] = "10px";
        }
    }
);

Note that this doesn't get the corresponding x-css-shadow, but once it can be dragged again it is easy enough to correct.

0
4

If using Chrome [or prolly IE in its version of DevTools], these steps work:

  • F12 [DevTools]
  • click the Inspect arrow button
  • point the inspect arrow at the partially hidden Anonymous Apex window and move it around until you get the whole window highlighted -- e.g. not the side bars or the text area by themselves
  • click
  • you should see the < div > of the window with negative values for top and left -- double-click to allow edits and change them both to something small, and positive, like 50 for each
  • Press Enter to save your new position changes and watch your window move into view.
  • click that up arrow to your left here ;)
1
  • 1
    you're welcome, SR
    – CRT
    Commented Apr 27, 2019 at 5:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .