Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheeling issue on iframes #110

Open
julifos opened this issue Jan 21, 2021 · 0 comments
Open

Wheeling issue on iframes #110

julifos opened this issue Jan 21, 2021 · 0 comments

Comments

@julifos
Copy link

julifos commented Jan 21, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant