Bug 1144418 - target events for text nodes in shadow dom to the nearest element in the flattened tree. r=wchen
This commit is contained in:
@@ -7734,7 +7734,7 @@ PresShell::HandlePositionedEvent(nsIFrame* aTargetFrame,
|
||||
// We use weak pointers because during this tight loop, the node
|
||||
// will *not* go away. And this happens on every mousemove.
|
||||
while (targetElement && !targetElement->IsElement()) {
|
||||
targetElement = targetElement->GetParent();
|
||||
targetElement = targetElement->GetFlattenedTreeParent();
|
||||
}
|
||||
|
||||
// If we found an element, target it. Otherwise, target *nothing*.
|
||||
|
||||
Reference in New Issue
Block a user