• Resolved marek123x

    (@marek123x)


    Hey.
    Great plugin so far. I have an error on WP 5.7 – MouseWheel triggers slide, even when disabled.
    No console errors what so ever. enabling and disabling doesn’t work.

    Cannot scroll through page without slides being triggeres by the mousewheel.

    Any advice or fix?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter marek123x

    (@marek123x)

    I debugged and unminified the JS file frontend_blocks.js and found out that this is triggering the slide:

    mousewheel: {
        releaseOnEdges: false,
      },

    even if “releaseOnEdges == false” (in the gutenberg blog settings) the init method fires mousewheel = true.

    deleting
    i.hasAttribute("data-releaseonedges") && ((t.options.mousewheel = {}), (t.options.mousewheel.releaseOnEdges = i.getAttribute("data-releaseonedges"))),

    from the JS, disables the mousewheel.

    Need to check if mousewheel is enabled, if so, releaseOnEdges should be available in the init… if disabled, releaseOnEdges shouldn’t be loaded into the init method.

    Thread Starter marek123x

    (@marek123x)

    temporarily fixed by adding:

    i.getAttribute("data-mousewheel") == "true" &&

    to the

    i.hasAttribute("data-releaseonedges") && ((t.options.mousewheel = {}), (t.options.mousewheel.releaseOnEdges = i.getAttribute("data-releaseonedges"))),

    so it looks like:
    i.getAttribute("data-mousewheel") == "true" && (i.hasAttribute("data-releaseonedges") && ((t.options.mousewheel = {}), (t.options.mousewheel.releaseOnEdges = i.getAttribute("data-releaseonedges")))),

    mousewheel and releaseOnEdges even works when enabled.

    feel free to use it or to find a more elegant solution. For now, it works fine for me! ??

    Plugin Author digitalapps

    (@digitalapps)

    Hi @marek123x thank you for bringing this to my attention.

    I have adjust the code and all should be working now.

    Empty mousewheel object was setting mousewheel.enabled to true, I think thats what you were referring in your code.

    All should be fine now, please test and get back to me if any issues.

    Thread Starter marek123x

    (@marek123x)

    Great job. Exactly this! ??
    Works great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘MouseWheel event triggers’ is closed to new replies.