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

Commits on Sep 23, 2015

  1. 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.
    topherfangio committed Sep 23, 2015
    Configuration menu
    Copy the full SHA
    82ff4ab View commit details
    Browse the repository at this point in the history