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

popover: Cannot read property 'isOpen' of null:TypeError: Cannot read property 'isOpen' of null #4552

Closed
jhwhite opened this issue Oct 8, 2015 · 8 comments

Comments

@jhwhite
Copy link

jhwhite commented Oct 8, 2015

I have a few popovers on a page using popover-template. Each popover has one link in the template.

When I click on the link in the popover I go to the page and everything is fine.

When I click the BACK button and click on any popover and then click on a link I get an error:

Cannot read property 'isOpen' of null:TypeError: Cannot read property 'isOpen' of null

I found this: #3347 and thought it might be related so I implemented the change in my code (I'm on v0.13.4) but that did not fix it.

I'm trying to create a plunkr but when I click on a link in a popover in plunkr I am not taken to the page. But when I right click and choose open in new tab I am taken to the correct page. Because I can't open a link in plunkr I can't reproduce this issue there.

@jhwhite
Copy link
Author

jhwhite commented Oct 8, 2015

I think I've fixed this by changing line 3546 from:

if ( ttScope.isOpen) {

to

if (ttScope && ttScope.isOpen) {

@RobJacobs
Copy link
Contributor

This was fixed as part of PR #4455. Are you still seeing the problem when using the latest from the master branch?

@jhwhite
Copy link
Author

jhwhite commented Oct 8, 2015

I'm using Visual Studio and I installed via Nuget so I'm getting one file. For Master it's broken down by module right? I could be missing it but I don't see a ui-bootstrap-tpls.js file.

@icfantv
Copy link
Contributor

icfantv commented Oct 8, 2015

@jhwhite, @RobJacobs is referring to the master build. So you would run npm install followed by grunt and it will build the distribution and put it into the dist folder. Please let us know so we can close this. Thanks.

@jhwhite
Copy link
Author

jhwhite commented Oct 8, 2015

It's ok to close.

I take that back. When I build and add ui-bootstrap-tpls-0.14.0-SNAPSHOT to my project I get the error again.

@icfantv
Copy link
Contributor

icfantv commented Oct 8, 2015

@jhwhite, please create a working plunker with your built JS file that shows the error.

@jhwhite
Copy link
Author

jhwhite commented Oct 8, 2015

@icfantv I can try that in a bit, but I did try to create a plunkr earlier with v0.13.4 and I to duplicate the issues I need to open a link but I wasn't able to open a link in the same window inside plunkr. But I know the link works because if I right click and open in new tab or window then the site loads.

@RobJacobs
Copy link
Contributor

I was able to reproduce this on the latest build. The problem is in the tooltipLinkedScope.$$postDigest function here The tooltip set's the ttScope to null in the scope.$on('$destroy' and still triggers a postDigest. I'll put together a PR to address this shortly.

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

3 participants