Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'ownerDocument' of undefined on Element types #60

Open
scotteza opened this issue Apr 17, 2016 · 5 comments
Open

Comments

@scotteza
Copy link

This line of code:
$fkEl.popover('show');

Throws the exception:

angular.js:11594 TypeError: Cannot read property 'ownerDocument' of undefined (full stack at the end of this comment).

With a breakpoint on $fkEl.popover('show');, I can see that the selector has found my element, but for some reason is throwing this exception. What am I doing wrong?

The stack trace is as follows:

angular.js:11594 TypeError: Cannot read property 'ownerDocument' of undefined
at Function.gb.contains (http://localhost/bower_components/jquery/dist/jquery.min.js:2:12147)
at Function.n.extend.buildFragment (http://localhost/bower_components/jquery/dist/jquery.min.js:3:14212)
at n.fn.extend.domManip (http://localhost/bower_components/jquery/dist/jquery.min.js:3:16801)
at n.fn.extend.after (http://localhost/bower_components/jquery/dist/jquery.min.js:3:15338)
at n.each.n.fn.(anonymous function) as insertAfter
at c.show (http://localhost/bower_components/bootstrap/dist/js/bootstrap.min.js:6:22544)
at HTMLSpanElement. (http://localhost/bower_components/bootstrap/dist/js/bootstrap.min.js:6:27388)
at Function.n.extend.each (http://localhost/bower_components/jquery/dist/jquery.min.js:2:2882)
at n.fn.n.each (http://localhost/bower_components/jquery/dist/jquery.min.js:2:847)
at b as popover

@compsagnathus
Copy link

I am also having this same issue - the element clearly gets selected, but in debugging the code it seems to call apart somewhere near

        function _showTooltip() {
            var self =this;
            $timeout(function () {
                $fkEl.popover('show');

@scotteza
Copy link
Author

@compsagnathus, I realised that there is a bug in the downloadable code which is fixed in the demo page. I diff'd the code from the root project, and the code on this page: http://abhikmitra.github.io/ng-joyride-demo/#/ and found minor differences.

So, just replace the version you are using with the ng-joyride.js on the demo page and it will work!

@compsagnathus
Copy link

thanks so much!

@Fr0ozen
Copy link

Fr0ozen commented May 27, 2016

hello, can you explain the source of this bug please? I have the same bug and i have brought enormously modification to the original code, so I can't replace my code with the code in the demo page

@scotteza
Copy link
Author

scotteza commented Jun 1, 2016

@Fr0ozen I don't know the exact details, I just know the demo version worked where the version on GitHub didn't.

To see the differences, diff the code between commit c599569 on this project and the code here: http://abhikmitra.github.io/ng-joyride-demo/bower_components/ng-joyride/ng-joyride.js using any diff tool (winmerge etc.).

You should then be able to merge these changes into your updated code.

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

No branches or pull requests

3 participants