Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(mdTooltip): Tooltip inside subheader causes Firefox hang. #4800

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdThe
*/
function getParentWithPointerEvents () {
var parent = element.parent();
while (parent && hasComputedStyleValue('pointer-events','none', parent[0])) {

// jqLite might return a non-null, but still empty, parent; so check for parent and length
while (parent && parent.length && hasComputedStyleValue('pointer-events','none', parent[0])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@topherfangio - I think we should move the hasComputedStyleValue to $mdUtil.hasComputedStyleValue( ); which would simplify testing of this feature.

parent = parent.parent();
}

return parent;
}

Expand Down