r2-testapp-kotlin
r2-testapp-kotlin copied to clipboard
Top bar (header) doesnt show sometimes
Bug Report
What happened?
Top bar header doesnt seems to be showing after sometime playing with the page swiping and changing the reading mode as seen on the video attached.
You can see in the video I am trying to bring the top bar back by clicking on the page but it doesnt come. ( its done after the first minute.
https://user-images.githubusercontent.com/1643992/123521811-f2bd1c00-d6b0-11eb-9274-afb55ae08136.mp4
Environment
develop branch
Readium versions
all develop versions, i dont think its a problem with the latest version, ive been seeing this for a while now.
-
r2-shared-kotlin
: -
r2-streamer-kotlin
: -
r2-navigator-kotlin
: -
r2-opds-kotlin
: -
r2-lcp-kotlin
:
Development environment
- OS: macOS 10.3
- IDE: Android Studio 4.1.3
Testing device
- Android version:
- Model: Pixel 4 API 26
- Is it an emulator? Yes
does anyone know what the issue is ?
I couldn't reproduce this issue but it seems pretty random from what you described.
You might need to investigate yourself with your debugger. I would check in order:
- Is the JavaScript
onClick
event called? https://github.com/readium/r2-navigator-kotlin/blob/77f80c4bcc6a9f9b842354980a10597fa903eda4/r2-navigator/src/main/assets/readium/scripts/gestures.js#L12- You can use the Chrome Web Inspector to debug the web view from an Android device. Just open
chrome://inspect
on your computer.
- You can use the Chrome Web Inspector to debug the web view from an Android device. Just open
- Is the native
onTap
event called, and does the event passes all the conditions? https://github.com/readium/r2-navigator-kotlin/blob/77f80c4bcc6a9f9b842354980a10597fa903eda4/r2-navigator/src/main/java/org/readium/r2/navigator/R2BasicWebView.kt#L198- Then check that the
listener
is set andlistener.onTap
is called https://github.com/readium/r2-navigator-kotlin/blob/77f80c4bcc6a9f9b842354980a10597fa903eda4/r2-navigator/src/main/java/org/readium/r2/navigator/R2BasicWebView.kt#L229
- Then check that the
- Is
R2EpubActivity.onTap
called https://github.com/readium/r2-navigator-kotlin/blob/77f80c4bcc6a9f9b842354980a10597fa903eda4/r2-navigator/src/main/java/org/readium/r2/navigator/epub/R2EpubActivity.kt#L187-L189- Then inspect
toggleActionBar()
https://github.com/readium/r2-navigator-kotlin/blob/77f80c4bcc6a9f9b842354980a10597fa903eda4/r2-navigator/src/main/java/org/readium/r2/navigator/epub/R2EpubActivity.kt#L140
- Then inspect
Yes, even I observed this issue. steps worked at my end to reproduce the issue.
- open ebook and tap on it appbar will appear
- tap once again appbar will disappear
- Now swipe quickly the pages (moving forward)
- now tap on the reader and check the behavior. appbar will not appear.
- repeat the steps 2 to 4 incase it is not reproduced .