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

tooltip's tt_content & "empty" value #1348

Closed
nuriahmetov opened this issue Dec 4, 2013 · 3 comments
Closed

tooltip's tt_content & "empty" value #1348

nuriahmetov opened this issue Dec 4, 2013 · 3 comments

Comments

@nuriahmetov
Copy link

Hi there!
Sorry for my English =). I'm using last github versions of Angular & UI-Bootstrap (1.2.4 & 0.8.snapshot). Maybe some bug there...
controller:

$scope.tip = 'Hi there!';

template:

<input type="text" ng-model="tip" tooltip="{{ tip }}">

Mouseenter will show a proper tooltip: "Hi there!", but if you erase input's value and mouseenter again, you'll see "Hi there!". Is it right behaviour? I think it shouldn't be shown, isn't?

Something like this: (tooltip.js, about line 249)

attrs.$observe( type, function ( val ) {
   scope.tt_content = val;
   if ( !val && scope.tt_isOpen ) {
      hide();
   }
});
@bekos
Copy link
Contributor

bekos commented Dec 7, 2013

@nuriahmetov Thanks for the report and the proposed solution. I can reproduce this on our demo page.
What about a nice PR with an accompanying test?

bekos added a commit to bekos/bootstrap that referenced this issue Dec 8, 2013
@nuriahmetov
Copy link
Author

@bekos you did it! Thanks!

bekos added a commit that referenced this issue Dec 9, 2013
@bekos
Copy link
Contributor

bekos commented Dec 9, 2013

@nuriahmetov Thank you. Fix landed on master.

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

No branches or pull requests

2 participants