timeglider / jquery_widget

Timeglider's JS Widget component. See README for details.
193 stars 41 forks source link

'k.position().left' is null or not an object error when loading in IE7 #28

Closed joeydanielallen closed 12 years ago

joeydanielallen commented 12 years ago

Great tool! Getting error during load for IE7. Get same behavior/error in IE9 noncompatibility mode. Gotta love IE! I haven't had a chance to run this down but thought others may have same issue.

Also, timeline drag left/right not working, nor mouse icon not changed which most likely comes from error.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618; InfoPath.2; .NET4.0C; .NET4.0E) Timestamp: Wed, 5 Oct 2011 16:15:47 UTC

Message: 'k.position().left' is null or not an object Line: 315 Char: 492 Code: 0 js/timeglider-0.1.0.min.js

joeydanielallen commented 12 years ago

Could have been my issue when hiding the title bar. Original code was used on IE7 and got different error.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618; InfoPath.2; .NET4.0C; .NET4.0E) Timestamp: Wed, 5 Oct 2011 16:44:32 UTC

Message: Object expected Line: 1171 Char: 4 Code: 0 URI: /js/timeglider/TG_TimelineView.js

timeglider commented 12 years ago

I was able to tackle this by caching the left position of the element into a data- attribute when it gets painted, rather than using jQuery to retrieve it using position().left later — I couldn't figure out why IE7 wasn't able to do the position retrieval. It just seemed to not have that DOM information available. Possibly a kind of "stack overflow" for DOM events in IE7... Anyhow, it seems to work now with that fix.