Support » Plugin: WordPress Social Login (Google, Twitter, Vkontakte) » bug cookie in social_login.js

  • Resolved X-NicON

    (@x-nicon)


    Hi, half a year, I was tagged by one bug, and I finally found it!

    file social_login.js

    line:
    if ( jQuery.cookie(“scroll”) !== null ) {

    The problem is that if the value of null
    then is returned type is string

    if cookie scroll store null value then
    typeof jQuery.cookie(“scroll”) -> string

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author miniOrange

    (@cyberlord92)

    Hi @x-nicon,

    Thanks for pointing this out.

    We are looking into this.
    We will publish a plugin update with the fix soon.

    Thanks,
    miniOrange Team

    Plugin Author miniOrange

    (@cyberlord92)

    Hi,

    You can find the fix to this issue in version 6.2.6.
    Please let us know if it is working fine for you.

    Thanks,
    miniOrange Team

    Nice

    Strange bug ..

    I advise you to rely on this recommendation.
    https://stackoverflow.com/a/3671790/1503829

    
    jQuery(window).on('load', function () {
    
        // If cookie is set, scroll to the position saved in the cookie.
        if ( jQuery.cookie("scroll") ) {
            jQuery(document).scrollTop( jQuery.cookie("scroll") );
            jQuery.removeCookie('scroll', { path: '/' })
        }
    
        // When a button is clicked...
        jQuery('.custom-login-button').on("click", function() {
    
            // Set a cookie that holds the scroll position.
            jQuery.cookie("scroll", jQuery(document).scrollTop() );
    
        });
    
        jQuery('.login-button').on("click", function() {
    
            // Set a cookie that holds the scroll position.
            jQuery.cookie("scroll", jQuery(document).scrollTop() );
    
        });
    
    });
    

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘bug cookie in social_login.js’ is closed to new replies.