circlingthesun / angular-foundation-6

Foundation 6 directives for Angular 1.5+
http://circlingthesun.github.io/angular-foundation-6/
Other
95 stars 50 forks source link

Dropdown toggle js error when clicked #42

Closed DannyStaten closed 7 years ago

DannyStaten commented 7 years ago

With this markup

<dropdown-toggle>
                <toggle>Teacher</toggle>
                <pane>
                    Teacher
                </pane>
            </dropdown-toggle>

When I click on teacher, it all appears correct in chrome, but the console shows the following javascript error: angular.js:14199 TypeError: Cannot read property 'getBoundingClientRect' of undefined at Object.offset (angular-foundation.js:1706) at Object.position (angular-foundation.js:1680) at positionPane (angular-foundation.js:521) at open (angular-foundation.js:463) at DropdownToggleController.$ctrl.toggle (angular-foundation.js:497) at fn (eval at compile (angular.js:15126), :4:453) at expensiveCheckFn (angular.js:16213) at callback (angular.js:26592) at Scope.$eval (angular.js:17994)

DannyStaten commented 7 years ago

I had mistakenly thought that the toggle and pane did not require any specific markup be contained in their nodes to work properly (which in my opinion would be more correct). Once I had a div with class menu in the pane the error went away.

circlingthesun commented 7 years ago

:+1: