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

Please help, openContentUrl() dosen't work well in Electron app when the url contains #. #442

Open
hz0324 opened this issue Mar 13, 2018 · 1 comment

Comments

@hz0324
Copy link

hz0324 commented Mar 13, 2018

Hi,

I have build an web app with Readium before, it works perfectly. Now I am trying to move the app to Electron, almost using the same code.

But something wired happened. I found that, in the Electron App, if the reader is in scroll-document mode, it cannot jump to the right place using openContentUrl when the url has a hashtag in it, such as "Text/chapter4.html#section_1". However, if the reader is in "auto" mode (AKA, Paged), openContentUrl can jump to the right place.

Sum it up, the same code, working all good on Web app. Copying the code into an Electron App, openContentUrl() can not work properly when the reader is in scroll-doc mode and the url contains # in it.

I have read the code of openContentUrl, but I can not understand the meaning of the second and third parameters. Now, my code is like this, I copy this code from Readium web reader, it seems to work very well for Web App.

qq 20180313164435

Please help, thank you very much.

@danielweck
Copy link
Member

There is an old (out of date) GitHub branch which "ports" the ChromeApp to an Electron app, but this code hasn't been tested for a long time.
It was just an experiment (also basic support for Apache Cordova in the same branch), but EPUB rendering / navigation used to work.
https://github.com/readium/readium-js-viewer/tree/feature/electron

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

No branches or pull requests

3 participants