readium / kotlin-toolkit

A toolkit for ebooks, audiobooks and comics written in Kotlin
https://readium.org/kotlin-toolkit
BSD 3-Clause "New" or "Revised" License
191 stars 82 forks source link

Touch gestures are ignored in FXL resources #131

Open llemeurfr opened 4 years ago

llemeurfr commented 4 years ago

We've been offered an EPUB FXL sample featuring some js effects. It is stored at https://drive.google.com/file/d/1EVHnCXPCGGdGL5AXjVMCVp5cWorMAgNi/view?usp=sharing

None of these interactive features are working. The taps of the users on the screen are intercepted to show/hide the app menus and javascript seems disabled.

Note that this EPUB plays well on iBooks

mickael-menu commented 3 years ago

This problem is only on FXL resources. It looks like any touch handling is disabled in a FXL web view, because the JS event callbacks are not called. Something to investigate on the Kotlin side.

mickael-menu commented 3 years ago

There's no straightforward way to fix this unfortunately. R2FXLLayout is overriding any touch event to handle manually scrolling, zooming, etc. instead of relying on the web view. I think to fix this issue we'll need to revamp the FXL implementation.

mickael-menu commented 2 years ago

Note to self: Check that the audio is playing when tapping on the ladybug on a leaf in the EPUB ep-9780993321986.epub, once this is fixed.