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

Chrome displays items in incorrect order when using the continuous extension #54

Open
richardscarrott opened this issue Mar 6, 2013 · 0 comments
Assignees

Comments

@richardscarrott
Copy link
Owner

When there's over 10 items visible on one page and using the continuous extension the item order is incorrect when going from page 1 to the last page in Chrome and Safari.

Caused by sorting bug with disconnected nodes in Webkit which jQuery, as of version 1.9.0, is vulnerable to - http://bugs.jquery.com/ticket/13331

To fix add nodes before cloning like this:

elems.clonedBeginning = visibleItems
        // add one extra item in case it's partially visible
        .add(this.elements.items.slice(visibleItems.length).first())
            .clone()
                .addClass(cloneClass)
                .appendTo(elems.runner);

Instead of:

elems.clonedBeginning = visibleItems
        .clone()
             // add one extra item in case it's partially visible
            .add(this.elements.items.slice(visibleItems.length).first().clone())
                .addClass(cloneClass)
                .appendTo(elems.runner);

At line 79 - https://github.com/richardscarrott/jquery-ui-carousel/blob/master/js/jquery.rs.carousel-continuous.js#L79

@ghost ghost assigned richardscarrott Mar 6, 2013
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

1 participant