Skip to content

Loading overscroll in head #91

Closed
Andy77L opened this Issue Mar 19, 2013 · 3 comments

3 participants

@Andy77L
Andy77L commented Mar 19, 2013

I believe the latest version has introduced a bug that prevents overscroll from being loaded in the HTML HEAD section.

The generation of the 'compat' object requires the document BODY to exist and this is not available at the time of loading. I fixed this in my local copy by moving the compat creation and the test runner helper into the overscroll function.

So, the compat variable definition becomes:
var compat = null;

and overscroll function becomes:
function overscroll(options) {
if ( !compat )
{
// create node if there's not one present (e.g., for test runners)
if (dom.body === null) {
dom.documentElement.appendChild(
dom.createElement('body')
);
}

        compat = {
            animate: (function(){
@negatron

@Andy77L

I'm so glad I found this post, that extra body tag was driving me.

However, I'm not sure I'm able to follow your instructions on how to resolve the issue and so I've just rolled back to a previous version.

Perhaps you could turn your correction into a pull request and sort out the plug in for everyone... That would be very helpful.

Thanks!

@Andy77L
@negatron

Amazing, thanks Andy.

@azoff azoff added this to the 1.7.4 milestone Feb 12, 2014
@azoff azoff pushed a commit that closed this issue Feb 12, 2014
Jonathan Azoff 1.7.4 Release
- Adds source map to compiled output
- Removes legacy `demo.html`
- Drops IE<9 support
- Updates License and Copyright
- Changes compat to be lazy-loaded and memoized. Closes #98. Fixes #91
- Fixes formatting in test files
- Adds `thumbColor` option, to allow user-defined thumb colors. Closes #102
- Adds, and removes, a DOM body if required for testing. Closes #93
ee50e80
@azoff azoff closed this in ee50e80 Feb 12, 2014
@azoff azoff pushed a commit that referenced this issue Feb 12, 2014
Jonathan Azoff 1.7.4 Release
- Adds source map to compiled output
- Removes legacy `demo.html`
- Drops IE<9 support
- Updates License and Copyright
- Changes compat to be lazy-loaded and memoized. Closes #98. Fixes #91
- Fixes formatting in test files
- Adds `thumbColor` option, to allow user-defined thumb colors. Closes #102
- Adds, and removes, a DOM body if required for testing. Closes #93
1913bfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.