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

uib-tooltip issue-showing two tooltip at a time #6559

Open
Vikas-Kumar56 opened this issue Jun 6, 2017 · 15 comments
Open

uib-tooltip issue-showing two tooltip at a time #6559

Vikas-Kumar56 opened this issue Jun 6, 2017 · 15 comments

Comments

@Vikas-Kumar56
Copy link

I am trying to change the current message of uib-tooltip in my directive but it creates a new tooltip and start displaying two tooltips at a time.
Here is the plunker demonstrating the issue.
https://plnkr.co/edit/Dk0VYxA6kb0w1hTDis11?p=preview
How can i change the message of uib-tooltip in my directive.

Thank in advance.

@WVWillHall
Copy link

scope.$emit('$destroy');
$compile(element)(scope);

@Vikas-Kumar56
Copy link
Author

Thank for reply..
Now it showing one tooltip but it displaying following error
i am using tooltip inside ui-grid column
capture

@WVWillHall
Copy link

Can you reproduce on plunker?

@Vikas-Kumar56
Copy link
Author

Vikas-Kumar56 commented Jun 6, 2017

This Line written in uib-bootstrap tpls

        /**
         * Observe the relevant attributes.
         */
        attrs.$observe('disabled', function(val) {
          if (val) {
            cancelShow();
          }

          if (val && ttScope.isOpen) {
            hide();
          }
        });

And here you can see we are checking isOpen property without verify ttScope is exit or not if i changed this condition with this then it does not show any error on console

        /**
         * Observe the relevant attributes.
         */
        attrs.$observe('disabled', function(val) {
          if (val) {
            cancelShow();
          }

          if (val && ttScope && ttScope.isOpen) {
            hide();
          }
        });

@WVWillHall
Copy link

can you open a pr for it?

@Vikas-Kumar56
Copy link
Author

pr??

@WVWillHall
Copy link

A pull request.

@Vikas-Kumar56
Copy link
Author

Sorry Sir I did not understand :'(

@WVWillHall
Copy link

no worries

@Vikas-Kumar56
Copy link
Author

Then What Should I do now sir any help ??

@Vikas-Kumar56
Copy link
Author

Should I change in my bootstrap file or it will fixed by bootstrap team and come in next update

@WVWillHall
Copy link

change in your file - or just checkout my branch, this project is very slow to ingest changes.

@Vikas-Kumar56
Copy link
Author

Is it sure that this issue will be resolved in next update of the library as my project will go on production and If I will be doing manual changes in library code , then the code will be replaced with the upcoming update of the library and my changes will be lost then.

@WVWillHall
Copy link

Nope, no guarantees at all

@Vikas-Kumar56
Copy link
Author

scope.$emit('$destroy');
No doubt it removes the previous tooltip but what about other library for example ui-grid if tooltip exist in one column of ui-grid, when i fire this $destroy event, ui-grid start misbehaving because in ui-grid they are also listening $destroy event .

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