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 'top' of undefined #5

Closed
piwi91 opened this issue Sep 15, 2013 · 13 comments · Fixed by #21
Closed

Cannot read property 'top' of undefined #5

piwi91 opened this issue Sep 15, 2013 · 13 comments · Fixed by #21

Comments

@piwi91
Copy link

piwi91 commented Sep 15, 2013

In the current Bootstrap 3 (dev-master) I get an error on the offset.
Code:

        place: function () {
        var position = 'absolute';
        var offset = this.component ? this.component.offset() : this.$element.offset();
        this.width = this.component ? this.component.outerWidth() : this.$element.outerWidth();
        offset.top = offset.top + this.height;

        var $window = $(window);
@niftylettuce
Copy link

please close this issue and see #13 as I've merged/fixed this issue among others and opened a pull request

@Eonasdan Eonasdan closed this as completed Oct 2, 2013
@Eonasdan
Copy link
Owner

Eonasdan commented Oct 2, 2013

check out the latest version. Should have address this issue.

@WhiteRavenTechnology
Copy link

May be doing something wrong, but I'm still seeing the "top" issue in the latest build....

Can anyone else verify?

👎

@niftylettuce
Copy link

were all of my changes pulled in @Eonasdan?

On Wed, Oct 9, 2013 at 1:07 AM, White Raven Technology <
notifications@github.com> wrote:

May be doing something wrong, but I'm still seeing the "top" issue in the
latest build....

Can anyone else verify?

[image: 👎]


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-25947084
.

@Eonasdan
Copy link
Owner

@niftylettuce for the most part. @WhiteRavenTechnology can you post a jsfiddle or a test page or something?

@Eonasdan Eonasdan reopened this Oct 11, 2013
@WhiteRavenTechnology
Copy link

First time messing with jsfiddle, so sorry if it's not what you're after.

This illustrates the problem (kinda) -- the first box works fine (barring some minor css/icon issues).

The second example (no icon, activates on focusing on the text box) breaks -- the error is "cannot read property 'top' of undefined"

http://jsfiddle.net/yBjzP/

Lemme know if you need anything else!

@Eonasdan
Copy link
Owner

@WhiteRavenTechnology check the new minified file I just uploaded. When I tried your example, I did get cannot read property 'top' of undefined with the min version, but if I used the full copy it worked just fine. I used a different compress tool this time and it worked for me.

@WhiteRavenTechnology
Copy link

The raw source is working fine for me now, but the minified version gives me this error now: Uncaught TypeError: Cannot read property 'M' of undefined

Completely kills the script.

Will stick with source, but is anyone else seeing this new error?

@Eonasdan
Copy link
Owner

hmmm... I usually let Asp.net minify my js on the fly. I'm sorry you're still having trouble. Have you tired a bare minimum test page to make sure it's not something else?

@WhiteRavenTechnology
Copy link

It's doing it on the fiddle above, too, and that's just jQuery 1.10.1, bootstrap, and your code. :(

@Eonasdan
Copy link
Owner

github doesn't usually allow hot linking. I'm not at a desk right now, I'll have to play with it later and get you going

@WhiteRavenTechnology
Copy link

Here's a fork of the original fiddle loading the full version and working (mostly) correctly -- a few unrelated CSS issues, but the JS works with the full version, not the minified.

No rush on a fix -- I can work with what I've got for now.

http://jsfiddle.net/6AbrV/

@schnie
Copy link

schnie commented Oct 12, 2013

I am also seeing Uncaught TypeError: Cannot read property 'M' of undefined

Eonasdan added a commit that referenced this issue Oct 14, 2013
Fixed #5 by getting offset and outerHeight
Eonasdan added a commit that referenced this issue Oct 14, 2013
fixed #5, version bump, added `defaultdate` option
Repository owner locked and limited conversation to collaborators Jun 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants