Skip to content

Commit

Permalink
Merge pull request #98 from zendyani/issue6334_2
Browse files Browse the repository at this point in the history
Issue 6334 (Pressing the search field shortcut should select the previously entered search text)
http://code.google.com/p/fbug/issues/detail?id=6334
  • Loading branch information
SebastianZ committed Sep 8, 2013
2 parents 362b174 + d5d44a3 commit 634b37c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions extension/content/firebug/chrome/searchBox.js
Expand Up @@ -37,6 +37,7 @@ Firebug.Search = Obj.extend(Firebug.Module,
{
var el = document.activeElement;
var id = el.id;
var doSearch = true;

if (id == "fbPanelBar1-browser" || id == "fbPanelBar2-browser")
{
Expand All @@ -49,11 +50,17 @@ Firebug.Search = Obj.extend(Firebug.Module,
sel = input.QueryInterface(Ci.nsIDOMNSEditableElement).
editor.selection.toString();
}
else
{
doSearch = false;
}
}

this.search(sel, Firebug.currentContext);
this.focus();
if (doSearch)
this.search(sel, Firebug.currentContext);
}

this.focus();
},

search: function(text, context)
Expand Down

0 comments on commit 634b37c

Please sign in to comment.