Comments (13)
Here is an example epub file. Error occurs from second page
from iridium.
OK. Clue. I see (by adding ) that we are inserting Readium stuff at the wrong place (see the <<link below:
<head><<link rel="stylesheet" type="text/css" href="/readium/readium-css/ReadiumCSS-before.css"/>
Weird. Never happened. I have to check the pattern matching in the HtmlInjector
code...
from iridium.
The structure of your HTML seems to defeat our pattern matching. Should be pretty easy to fix, but I need time. I have to switch to other tasks for now, but I'll fix that shortly, probably tomorrow. Sorry for the trouble.
from iridium.
Hi @vitaliynester, I tried a quick fix that seems to work well on your book: on this line, remove the "+ 1", as follows:
var beginHeadIndex = head.end;
I don't push it for now, I'll wait for your feedback.
I need to have a deep look at this part of the code globally; it definitely requires some love :-)
from iridium.
This is wonderful! I will try this fix and test it on similar books. Thanks a lot!
from iridium.
I have tried this solution and it fixed all the books that I had an issue with, will be testing it for the upcoming week and tell you my feedback, Thanks !
from iridium.
This is only in the version with inappwebview, older versions with webview work correctly
from iridium.
Hi @vitaliynester, can you provide us with a sample epub? Do you see some logs? This really suggests a malformed Epub... But your comment about the previous version (based on WebView) contradicts this feeling...
from iridium.
OK, I can reproduce the issue on Android and iOS. On iOS, the Webview appears white, without the red paragraph. The chapter2.xhtml
source code looks good, I don't see for now what can cause this issue. Investigating...
from iridium.
I think the problem is in chapter1.xhtml
. When you open it through the editor (VSCode), you can see that block a is highlighted in red. If you open this file in a browser, then the DOM tree looks different. First image - VSCode, second - chrome
from iridium.
Thank you for the feedback. These differences are just a pretty-print artifact. VS displays a compact form when the element has no child, I think (<a id:"n_1"/>
), while Chrome doesn't. In the book source code, it's written in this compact mode, too.
I checked with validators, chapter1.xhtml
is theoretically OK. And it shouldn't impact other chapters (each one is opened in a different webview)... For now, I'm perplexed. But I see an error in the logs:
WebViewScreenState.buildWebViewComponent.<ac>: WebView[ERROR]: Uncaught ReferenceError: readium is not defined
Digging...
from iridium.
More precisely, the wrong generated code is:
<
<link rel="stylesheet" type="text/css" href="/readium/readium-css/ReadiumCSS-before.css"/>
<style>
audio[controls] {
width: revert;
height: revert;
}
</style>
link rel="stylesheet" href="../Styles/book.css" type="text/css" />
Both Readium-specific injected elements are inserted inside the element of the book instead of being inject outside of it!!!
The issue happens somewhere around these lines.
from iridium.
I wonder why then it does not work with a particular instance, and not in general? How can this be fixed?
from iridium.
Related Issues (20)
- Provide an option to prevent starting a HTTP server when opening a book
- how to read .lcpl ebook file
- Feature request: flutter-web support.
- Epub viewer bug: screen orientation error
- Gesture feature: popup hook for clicked element
- 【solved】pop-up layer bug on iOS HOT 1
- 【solved】obtain the paragraph id HOT 2
- Can't delete ebooks HOT 2
- note and bookmark not work on Android 6 because paginationInfo and currentSpineItemContext is null
- 【solved】flip many pages once a time HOT 1
- Demo app fails to build with error: Member not found: 'STORE'. HOT 3
- Loading a saved location HOT 6
- ERR_UNSAFE_PORT when opening book HOT 3
- Issue with back button in ReaderAppBar HOT 3
- How to disable scroll while selecting text? HOT 2
- ReaderToolbar buttons are skipping chapters instead of pages
- [IOS] Reading book not working HOT 1
- How can I get a text on the screen?
- How to console log to flutter debug console. HOT 1
- Project is not running (build error)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iridium.