Skip to content

Commit

Permalink
stackingContext getting null after several update(by set_innerHTML)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrico Gonçalves committed Apr 15, 2014
1 parent 6a768a9 commit 9e8d232
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cocktail/core/html/HTMLDocument.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1467,8 +1467,13 @@ class HTMLDocument extends Document
*/
private function getFirstElementRendererWhichCanDispatchMouseEvent(x:Int, y:Int):ElementRenderer
{
var elementRendererAtPoint:ElementRenderer = _hitTestManager.getTopMostElementRendererAtPoint(documentElement.elementRenderer.layerRenderer.stackingContext, x, y);

var layerRendererTmp = documentElement.elementRenderer.layerRenderer;
if (layerRendererTmp.stackingContext == null)
{
layerRendererTmp.updateStackingContext();
}
var elementRendererAtPoint:ElementRenderer = _hitTestManager.getTopMostElementRendererAtPoint(layerRendererTmp.stackingContext, x, y);

//might be null, for instance when mouse leaves the
//window
if (elementRendererAtPoint == null)
Expand Down

0 comments on commit 9e8d232

Please sign in to comment.