Skip to content

Commit

Permalink
Issue 6952: HTML panel - search: Sometimes the search is not highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Nov 7, 2013
1 parent bd0d286 commit 2da3d36
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions extension/content/firebug/html/htmlLib.js
Expand Up @@ -286,22 +286,22 @@ var HTMLLib =
*/
this.selectMatched = function(nodeBox, node, match, reverse)
{
setTimeout(Obj.bindFixed(function()
// Force a reflow to make sure search highlighting works (issue 6952).
nodeBox.offsetWidth;

if (match.fullNodeMatch)
{
if (match.fullNodeMatch)
{
this.selectWholeNode(nodeBox);
}
else
{
var reMatch = match.match;
this.selectNodeText(nodeBox, node, reMatch[0], reMatch.index, reverse,
reMatch.caseSensitive);
}
this.selectWholeNode(nodeBox);
}
else
{
var reMatch = match.match;
this.selectNodeText(nodeBox, node, reMatch[0], reMatch.index, reverse,
reMatch.caseSensitive);
}

Events.dispatch([Firebug.A11yModel], "onHTMLSearchMatchFound",
[panelNode.ownerPanel, match]);
}, this));
Events.dispatch([Firebug.A11yModel], "onHTMLSearchMatchFound",
[panelNode.ownerPanel, match]);
};

/**
Expand Down

0 comments on commit 2da3d36

Please sign in to comment.