swfkrpano.js doesn't (completely) prevent page scrolling

  • Greetings

    I have a problem on my webpage. "swfkrpano.js" mostly prevents the page from scrolling when using the mouse wheel, but sometimes, when I scroll the mouse wheel quickly, both the panorama zoom and the page scroll happen. I've tested it on Chrome and Firefox, and I'm using version 1.0.8.14 (I had the same problem with 1.0.8.12 though).

    Can anyone reproduce the problem or has seen something similar before?

    On this webpage it works perfectly for me: https://krpano.com/docu/html/swfobject15/mousewheelfix.html

    Thanks,
    Manuel

  • Hi,

    in Firefox I can't reproduce the problem, but in Chrome yes - there the wheel sometimes scrolls the page,
    but I think there is currently no solution possible for Chrome in this case - even when totally blocking the mouse wheel, it still scroll when using the mouse wheel very quickly...

    best regards,
    Klaus

  • I'm experiencing the same problem (or actually my client is, I don't use a scrollmouse). I can reproduce it with almost any krpano instance on a scrolling page, though it is much easier to trigger in some then in others.

    The problem seems to be that if a mousewheel event is fired at a moment when krpano is busy (or is keeping the browser, or the computer busy) by eg loading a tile or drawing a frame, the scrollwheel script fails to catch the event and prevent the default behavior. This would explain why on simple panoramas it is hard to trigger this bug, but it is easier on eg a gigapixel panorama with lots of hotspots coming in and out of view.

    Unfortunately I cannot share the project I am working on right now, because it is a bit heavy on the client-side and reproduces the problem easily. But given some effort scrubbing the mousewheel up and down quickly, at least in Firefox I can reproduce it even on the simplest panoramas such as the old scrollwheel testbed:
    https://krpano.com/docu/html/swfobject15/mousewheelfix.html
    Using Chrome and IE, I cannot really get it to happen on simple panoramas like this. But larger project (gigapixel with hotspots etc), it's a real issue with all browsers I've tested.

  • I've been able to fix it for my particular project. In my project the krpano page is shown as an "iframe" (actually as an object, because it is in an xhtml page), so the page that actually has the krpano content never needs to scroll. I use the following code to the iframed page:

    The code is loosely based on MouseWheelTrap:
    http://www.spikything.com/blog/index.php…wser-scrolling/

    Note that the code above will stop all mousewheel scrolling on the page that it is used on. One could use the allowBrowserScroll() function in onmouseover and onmouseout handlers for the krpano div, but I have not tested that.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!