epub.js icon indicating copy to clipboard operation
epub.js copied to clipboard

Page is bouncing back to the chapter before when I'm scrolling up.

Open GuvenCiddioglu opened this issue 3 years ago • 14 comments

The page keeps bouncing back when I try to scroll back to the top of the book. How do I solve this? I think overflow anchoring is not working properly.

GuvenCiddioglu avatar Nov 22 '22 15:11 GuvenCiddioglu

Same problem. any solution anyone?

robiulhassanshakil avatar Nov 29 '22 10:11 robiulhassanshakil

Same problem. any solution anyone?

Yeah fixed it with overflow-anchor.

Put it in the following epubjs css class:

.epub-container { overflow-anchor: none !important; }

GuvenCiddioglu avatar Nov 29 '22 10:11 GuvenCiddioglu

Thank You. but i am using default iframe. i try that style but it not working.can you help me please.

robiulhassanshakil avatar Nov 29 '22 11:11 robiulhassanshakil

Thank You. but i am using default iframe. i try that style but it not working.can you help me please.

It should still work with the default iframe, since that epub class is used in the reader.

GuvenCiddioglu avatar Nov 29 '22 11:11 GuvenCiddioglu

It should still work with the default iframe, since that epub class is used in the reader.

Thanks. but not working in my project.

robiulhassanshakil avatar Nov 29 '22 12:11 robiulhassanshakil

Where should I put this new CSS class (.epub-container) I have only epub.js did not find any css file that belongs to epub.js

-- Ori Idan CEO Helicon Books http://www.heliconbooks.com

On Tue, Nov 29, 2022 at 12:47 PM Troy98 @.***> wrote:

Yeah fixed it with overflow-anchor.

Put it in the following epubjs css class:

.epub-container { overflow-anchor: none !important; }

— Reply to this email directly, view it on GitHub https://github.com/futurepress/epub.js/issues/1303#issuecomment-1330435906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB43QCDIG7EXVVTCPIG3H3WKXNN7ANCNFSM6AAAAAASH6XS7M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

OriKuttner avatar Nov 29 '22 14:11 OriKuttner

Where should I put this new CSS class (.epub-container) I have only epub.js did not find any css file that belongs to epub.js

epub-container is not a new class. It's used in the default iframe that the epubjs library uses to display the book. So the only thing you have to do is add overflow-anchor: none !important; to that already existing CSS class.

Seems like @btpf has added this bug fix properly in his fork: https://github.com/btpf/epub.js/commit/d6609a7bb1a9ed6f2f0d8321ef99b08c43d16ec1

Great job!

GuvenCiddioglu avatar Nov 29 '22 20:11 GuvenCiddioglu

Note that this attribute has no support on Safari (Mac or mobile). Depending on your browser stats, this may be an issue until the feature is landed there.

Walter

On Nov 29, 2022, at 3:07 PM, Troy98 @.***> wrote:

Where should I put this new CSS class (.epub-container) I have only epub.js did not find any css file that belongs to epub.js … -- Ori Idan CEO Helicon Books http://www.heliconbooks.com On Tue, Nov 29, 2022 at 12:47 PM Troy98 @.> wrote: Yeah fixed it with overflow-anchor. Put it in the following epubjs css class: .epub-container { overflow-anchor: none !important; } — Reply to this email directly, view it on GitHub <#1303 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB43QCDIG7EXVVTCPIG3H3WKXNN7ANCNFSM6AAAAAASH6XS7M . You are receiving this because you are subscribed to this thread.Message ID: @.>

epub-container is not a new class. It's used present in the default iframe that the epubjs library uses to display the book. So the only thing you have to do is add overflow-anchor: none !important; to that already existing CSS class.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

walterdavis avatar Nov 29 '22 20:11 walterdavis

On Tue, Nov 29, 2022 at 10:07 PM Troy98 @.***> wrote:

Where should I put this new CSS class (.epub-container) I have only epub.js did not find any css file that belongs to epub.js … <#m_3237231677829662733_> -- Ori Idan CEO Helicon Books http://www.heliconbooks.com On Tue, Nov 29, 2022 at 12:47 PM Troy98 @.> wrote: Yeah fixed it with overflow-anchor. Put it in the following epubjs css class: .epub-container { overflow-anchor: none !important; } — Reply to this email directly, view it on GitHub <#1303 (comment) https://github.com/futurepress/epub.js/issues/1303#issuecomment-1330435906>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB43QCDIG7EXVVTCPIG3H3WKXNN7ANCNFSM6AAAAAASH6XS7M https://github.com/notifications/unsubscribe-auth/AAB43QCDIG7EXVVTCPIG3H3WKXNN7ANCNFSM6AAAAAASH6XS7M . You are receiving this because you are subscribed to this thread.Message ID: @.>

epub-container is not a new class. It's used present in the default iframe that the epubjs library uses to display the book. So the only thing you have to do is add overflow-anchor: none !important; to that already existing CSS class.

Where is this CSS class? I do not have a CSS file for epub.js I only have the file epub.js

Message ID: @.***>

OriKuttner avatar Nov 30 '22 00:11 OriKuttner

Note that this attribute has no support on Safari (Mac or mobile). Depending on your browser stats, this may be an issue until the feature is landed there. Walter

It seems that WebKit never had this this bug to begin with. See my testing here: https://github.com/futurepress/epub.js/issues/1295#issuecomment-1330963957 I'm unable to test on Safari, but since it also uses the WebKit engine, I don't think a fix is required.

btpf avatar Nov 30 '22 00:11 btpf

@btpf @Troy98 Thanks a lot. its working now.

robiulhassanshakil avatar Nov 30 '22 05:11 robiulhassanshakil

@btpf @Troy98 Thanks a lot. its working now.

No problem 👍

GuvenCiddioglu avatar Nov 30 '22 08:11 GuvenCiddioglu