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

Tooltip on button doesn't hide if button is disabled on click #1926

Closed
xyclos opened this issue Mar 12, 2014 · 6 comments
Closed

Tooltip on button doesn't hide if button is disabled on click #1926

xyclos opened this issue Mar 12, 2014 · 6 comments

Comments

@xyclos
Copy link

xyclos commented Mar 12, 2014

I have a "cancel/reset" button that gets ng-disabled if the form is $pristine.

Clicking the button clears the form and then instantly becomes disabled. the tooltip is not hidden.

here's a plunk

@pkozlowski-opensource
Copy link
Member

This is a scoping issue, tooltips are creating a child scope, we are going to remove those in the future.

Working plunk: http://plnkr.co/edit/gjA46FQ8Ln74zgi8IMR2?p=preview

@jdrake
Copy link

jdrake commented Apr 10, 2014

+1

@Hypercubed
Copy link
Contributor

Hmmm.... was this closed because it was fixed or because it will be fixed in the future? I'm currently using this CSS as a workaround:

button[disabled] + .tooltip {
  display: none !important;
}

plunker with workaround: http://plnkr.co/edit/jtfr72?p=preview

@Hypercubed
Copy link
Contributor

Hmm... has a problem that the tooltip will show again if the button is again re-enabled.

http://plnkr.co/edit/WlwybG?p=preview

Perhaps the tooltip directive should observe the disabled attribute:

attrs.$observe( 'disabled', function ( val ) {
  if (val && ttScope.isOpen ) {
    hide();
  }
});

@Hypercubed
Copy link
Contributor

Maybe nobody will notice this since it is closed....

@karianna
Copy link
Contributor

karianna commented Jan 7, 2015

Can you open a new bug please :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants