Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Hide the tooltip when its content becomes empty #875

Closed
@merrihew

Description

@merrihew

When the tooltip's content becomes empty (set to null), if the tooltip is currently open I think it should be closed. This is related to closed issue #129 , but it's different than the original issue and wasn't addressed in 030901e.

Here is my suggested modification to tooltip.js

attrs.$observe( type, function ( val ) {
    if ( !val && scope.tt_isOpen ) {
        hide();
        if ( angular.isDefined( scope.tt_animation ) && scope.tt_animation() ) {
            transitionTimeout = $timeout( function () { scope.tt_content = val; }, 500 );
        } else {
            scope.tt_content = val;
        }
    } else {
        scope.tt_content = val;
    }
});

Without the if/else statement the tooltip will momentarily become blank before hiding.

UPDATE (8/25): Added transitionTimeout conditional statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions