This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mdTooltip): Tooltip inside subheader causes Firefox hang.
When a `<md-tooltip>` was placed inside the `<md-subheader>`, an infinite loop was being hit (only in Firefox) which was causing the browser to hang. The infinite loop was caused by the tooltip's `getParentWithPointerEvents()` method which travels up the DOM looking for a parent who has pointer events. In Firefox, the `element.parent()` can apparently return an empty jqLite object that is not null, but whose length is 0. In this case, calling `parent.parent()` again will return the same object. Add a check to the tooltip's loop to ensure that `parent.length` is never 0. Fixes #4777.
- Loading branch information