kobolabs / epub-spec

Details on the elements of the ePub spec that Kobo supports, as well as other information on the Kobo reading platforms.
Other
191 stars 20 forks source link

Don’t alter layout recommendation #31

Closed JayPanoz closed 7 years ago

JayPanoz commented 8 years ago

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.

bdugas commented 8 years ago

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.

bdugas commented 7 years ago

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.