Skip to content

Wheeling issue on iframes #110

@julifos

Description

@julifos

Hi!
I'm testing Bibi as a solution or addon for a website called libretes.com, which will offer some free epubs. When inside an iframe, seems there are some issues in both "paged" and "horizontal" modes: the scroll wheel event is populated and the entire page scrolls, so you end missing the Bibi iframe. "Vertical" mode seems to work fine. Only tested on Chrome 77 Mac:

Visual explanation: animated GIF
This is apparently fixed preventing and stopping the propagation upon such conditions: embedded + paged or horizontal. In bibi.heart.js, currently at line 3058:

            const ToDo = WA != C.A_AXIS_L ? I.orthogonal('wheelings') : S.RVM == 'paged' ? 'move' : WheelObserver.OverlaidUIs.filter(OUI => OUI.contains(Eve.target)).length ? 'simulate' : '';
            if(!ToDo) return;
            if(O.Embedded&&S.RVM!='vertical'){
            	Eve.preventDefault();
            	Eve.stopImmediatePropagation();
            }
            //Eve.preventDefault(); // Must not prevent.
            //Eve.stopPropagation(); // No need to stop.

Sorry, I would contribute via GIT but I'm not sure how it works. Also I don't know if this is a real fix, as you are probably aware of many conditions I ignore (ie, behaviour in mobile devices, other browsers, etc.), so this code is just a suggestion (and a fix for my current conditions ;-)

BTW, many thanks for this mighty tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions