• Resolved ellewilliams

    (@ellewilliams)


    Hi Jory,

    I’m not sure if it was due the latest update of the plugin but I only just noticed that my scroll-locked sidebar is causing the page content to jump to the right when the sidebar is opened. The page content is centred so when the menu opens, the scrollbar underneath disappears and the page re-centres without the scroll bar width factored in.

    I don’t think it was doing this before the previous update as I’ve been working on this site for a few months and have only just noticed it.

    Is there an easy fix for this?

    Thanks a bunch,
    Elle

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi Elle,

    That is correct (since the latest update). In order for the scroll lock to work correctly I set the overflow property of the site on hidden when scrolling is locked. This causes the scroll feature to be disabled (and thus the scrollbar to be hidden).
    This is way more stable than my previous JavaScript solution.

    You can overwrite the CSS though and write your own scroll-lock JavaScript.
    Let me know if you have any ideas on a better solution.

    Cheers, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi Elle,

    I came up with a possible fix for your issue.
    Changes: https://github.com/JoryHogeveen/off-canvas-sidebars/pull/45

    Can you please verify this works for you?

    Thanks, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @ellewilliams,

    Did you find the time to test the changes?
    Please let me know. When testing locally it works great with the themes I have here.

    Thanks, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @ellewilliams,

    Since WP 4.9 is due I went ahead and merged the PR.
    PR for v0.4.2 is: https://github.com/JoryHogeveen/off-canvas-sidebars/pull/43

    I’m planning for release on monday 13th (the day before WP 4.9 will be released).

    Thanks, Jory

    Thread Starter ellewilliams

    (@ellewilliams)

    Hi Jory,

    So sorry for the late reply, I got locked out of my account.

    I have implemented this and it works great. Thanks very much!

    Elle

    Plugin Author Jory Hogeveen

    (@keraweb)

    No problem and thanks for testing. I will release tonight!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Scroll lock causing scrollbar to disappear + website to jump’ is closed to new replies.