Permalink
Browse files

do not loose console scrollpostion when switching tabs

  • Loading branch information...
1 parent 06c43c3 commit d89b323f8f0178ee2e1a3689882412f30268a625 @nightwing nightwing committed Aug 2, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −2 extension/content/firebug/console/consolePanel.js
  2. +2 −0 extension/content/firebug/firebug.js
@@ -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.
@@ -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;
}
},

0 comments on commit d89b323

Please sign in to comment.