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

Closing animated delayed tooltip breaks on scope destroy #1339

Closed
tak-amboss opened this issue Dec 3, 2013 · 3 comments
Closed

Closing animated delayed tooltip breaks on scope destroy #1339

tak-amboss opened this issue Dec 3, 2013 · 3 comments

Comments

@tak-amboss
Copy link

If I append a tooltip with popupdelay to a link on statechange tooltip (mostly) becomes null and the following error is thrown (in Firefox):

Error: tooltip is null $tooltip/link/hide/transitionTimeout
<@angular-ui-bootstrap-tpls-0.7.0.js?v=83adf2556701:2143 timeout/timeoutId
<@angular-1.2.3.js?v=83adf2556701:13363 completeOutstandingRequest@angular-1.2.3.js?v=83adf2556701:4026 Browser/self.defer/timeoutId
<@angular-1.2.3.js?v=83adf2556701:4332

in Chrome:

TypeError: Cannot call method 'remove' of null
at http://cdn.jsdelivr.net/angular.bootstrap/0.7.0/ui-bootstrap-tpls.js:2143:25
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.js:13363:28
    at completeOutstandingRequest (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.js:4026:10)
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.js:4332:7 

Here is a fiddle of this issue:
http://jsfiddle.net/tak_aryelle/ujRy2/1/

If I set poupDelay to '0' or animation to 'null' the issue doesn't occur.

Additionally in this fiddle the tooltip isn't even displayed in Firefox; in my local files this isn't a problem.

@pkozlowski-opensource
Copy link
Member

@tak-aryelle can you reproduce it as well without ui-router?

@tak-amboss
Copy link
Author

@pkozlowski-opensource destroying the scope causes the issue as well: http://jsfiddle.net/tak_aryelle/ujRy2/3/

@pkozlowski-opensource
Copy link
Member

@tak-aryelle thnx for narrowing it down, definitively a bug that should be addressed... Would you be up to preparing a pull request?

tak-amboss pushed a commit to tak-amboss/bootstrap that referenced this issue Dec 4, 2013
Closes angular-ui#1339
Closes angular-ui#1346

'tooltip' and '$body' have been set to null if scope was destroyed for preventing memory leaks (angular-ui#1133). Deleting both instead will prevent the described errors.
bekos added a commit to bekos/bootstrap that referenced this issue Dec 14, 2013
@bekos bekos closed this as completed in 3fe7aa8 Dec 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants