Skip to content

Commit

Permalink
do not loose console scrollpostion when switching tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Aug 2, 2012
1 parent 06c43c3 commit d89b323
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension/content/firebug/console/consolePanel.js
Expand Up @@ -155,12 +155,12 @@ Firebug.ConsolePanel.prototype = Obj.extend(Firebug.ActivablePanel,
if (state)
wasScrolledToBottom = state.wasScrolledToBottom;

if (typeof(wasScrolledToBottom) == "boolean")
if (typeof wasScrolledToBottom == "boolean")
{
this.wasScrolledToBottom = wasScrolledToBottom;
delete state.wasScrolledToBottom;
}
else
else if (typeof this.wasScrolledToBottom != "boolean")
{
// If the previous state doesn't says where to scroll,
// scroll to the bottom by default.
Expand Down
2 changes: 2 additions & 0 deletions extension/content/firebug/firebug.js
Expand Up @@ -1719,9 +1719,11 @@ Firebug.Panel = Obj.extend(new Firebug.Listener(),

if (this.panelNode)
{
var scrollTop = this.panelNode.scrollTop;
this.panelNode = doc.adoptNode(this.panelNode, true);
this.panelNode.ownerPanel = this;
doc.body.appendChild(this.panelNode);
this.panelNode.scrollTop = scrollTop;
}
},

Expand Down

0 comments on commit d89b323

Please sign in to comment.