Browse files

Issue 5134: Selected script in script window changes when timer chang…

…es markup on page
  • Loading branch information...
1 parent f39b64a commit 995bd3cc27396d99b1868a101d4d883ca8a49c66 @janodvarko janodvarko committed Mar 27, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 extension/content/firebug/js/scriptPanel.js
View
10 extension/content/firebug/js/scriptPanel.js
@@ -1118,7 +1118,15 @@ Firebug.ScriptPanel.prototype = Obj.extend(Firebug.SourceBoxPanel,
// but we have to refresh, so do the default.
if (!this.selectedSourceBox)
{
- this.navigate();
+ // If the current source-box has been deleted because it's out of sync
+ // (the victim, see above), we need to navigate again to the same URL.
+ // Otherwise the script panel would coincidentally switch to another script.
+ // (see issue 5134)
+ var object;
+ if (previousUrl)
+ object = this.context.getCompilationUnit(previousUrl);
+
+ this.navigate(object);
// Restore the scroll position (issue 5111)
if (this.selectedSourceBox)

0 comments on commit 995bd3c

Please sign in to comment.