-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Datepicker and tooltip conflict #2320
Comments
As I understand things, because both directives create an isolated scope, you'll have to wrap the input with another element and use the tooltip on the wrapper element. See this plunkr: http://plnkr.co/edit/7Bhu8IkSYXmGpI7UTfy6 |
Unfortunately I can't do it. Some times I use directives with template like: <div class="inputGroup inputGroup_form inputGroup_addonRight input-group-lg">
<input class="inputGroup-input inputGroup-input_form form-control"
type="{{show ? 'text' : 'password'}}"
ng-model="model">
<button type="button" class="inputGroup-addon input-group-addon" ng-click="show = !show">
<span class="icon inputGroup-addon-icon" ng-class="{'icon_eyeClose': show, 'icon_eyeOpen': !show}"></span>
</button>
</div> Which copy attributes on input element (including tooltip attribute). If I override tooltip directive that it wrap target element in other element with tooltip I will get <div class="inputGroup inputGroup_form inputGroup_addonRight input-group-lg">
<wrapper tooltip="...">
<input class="inputGroup-input inputGroup-input_form form-control"
type="{{show ? 'text' : 'password'}}"
ng-model="model">
</wrapper>
<button type="button" class="inputGroup-addon input-group-addon" ng-click="show = !show">
<span class="icon inputGroup-addon-icon" ng-class="{'icon_eyeClose': show, 'icon_eyeOpen': !show}"></span>
</button>
</div> And it break markup (I can't adapt markdown because it use bootstrap classes) Maybe you will use |
@leoduran You are correct, in v11 they both create an isolated scope which causes issues when you try to use both at the same time. While it's possible to create a wrapper for the new scope, it really feels like a downgrade to have to include extra syntax to use both at once... Also, your example will not work if the trigger for the tooltip is focus instead of mouseenter. Know of any other work-arounds? |
tt_ scope variables are now in the ttScope which is specific to each tooltip directive (multiple tooltip directives can now run on the same element). This allows tooltips to be used alongside any directive that may or may not require different scope types. Closes angular-ui#1269 Fixes angular-ui#2320 Fixes angular-ui#2203
tt_ scope variables are now in the ttScope which is specific to each tooltip directive (multiple tooltip directives can now run on the same element). This allows tooltips to be used alongside any directive that may or may not require different scope types. Closes angular-ui#1269 Fixes angular-ui#2320 Fixes angular-ui#2203
tt_ scope variables are now in the ttScope which is specific to each tooltip directive (multiple tooltip directives can now run on the same element). This allows tooltips to be used alongside any directive that may or may not require different scope types. Closes angular-ui#1269 Fixes angular-ui#2320 Fixes angular-ui#2203
I want show comment for date or error message if date incorrect etc. I cant do it because
http://plnkr.co/edit/puO9KD7AJSadR7znTMZ9
Fix it, please
The text was updated successfully, but these errors were encountered: