kobolabs / epub-spec

Details on the elements of the ePub spec that Kobo supports, as well as other information on the Kobo reading platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don’t alter layout recommendation

JayPanoz opened this issue · comments

In the JavaScript section, you recommend not to alter the layout of the book using scripts:

it is recommended not to use JavaScript in reflowable content in ways that may alter the layout of the book.

Actually, you don’t even need JS to alter the layout since you can create an accordion-like widget using <details> (cf. http://html5doctor.com/the-details-and-summary-elements/)

FYI, <details> work as expected in Kobo 4 iOS (and pagination is automatically refreshed).

It is not working in Kobo 4 Android: only <summary> is displayed, <details> is closed by default and you can't toggle it. Also, it looks like it triggers a bug: the last page of the xhtml file is duplicated.

Sorry for the delay on this one. I'll consider updating our JS section. If you have a sample ePub I can log the issue on Android.

I'm closing this for now as we don't want to advise on the widget method until/unless we also support this on Android.