Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2016, 03:58 AM   #1
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 554
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
kepub, EPUB3 and events

Hi,

I was trying to convert my Electronic Poetry ebook from EPUB3 to kepub, to make it working with Kobo e-ink devices. I can use simple animation and change text, but I have problem with events: when I touch a word and javascript has to change it with another word (for example), it works with preventDefault method, BUT Kobo keeps its personal touches features.
So, I touch, the word changes, BUT kobo turns the page. Or shows menu at the bottom of the screen.
Is there a way to prevent kobo to turn page or shows menu when an javascript event happens?

Fabrizio
fbrzvnrnd is offline   Reply With Quote
Old 12-29-2016, 06:35 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Do the specifications for what is / isn't supported help? See https://github.com/kobolabs/epub-spec
PeterT is offline   Reply With Quote
Advert
Old 12-30-2016, 03:12 AM   #3
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 554
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by PeterT View Post
Do the specifications for what is / isn't supported help? See https://github.com/kobolabs/epub-spec
Thank you for the answer. I used the specification you linked to, but the problem is here: "Kobo’s eInk and Desktop platforms have limited support for JavaScript, and do not support interactive JavaScript elements. "
I tried and Kobo's e-ink *supports* interactive elements... but it fails to disable the touch for turning page and menu on/off...

f.
fbrzvnrnd is offline   Reply With Quote
Old 12-30-2016, 04:52 AM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by fbrzvnrnd View Post
Thank you for the answer. I used the specification you linked to, but the problem is here: "Kobo’s eInk and Desktop platforms have limited support for JavaScript, and do not support interactive JavaScript elements. "
I tried and Kobo's e-ink *supports* interactive elements... but it fails to disable the touch for turning page and menu on/off...
I can think of two things here:

- Kobo's statement of what it supports doesn't say that the Javascript isn't executed. You can probably take it as "doesn't necessarily work the way you want". As Kobo uses ACCESS (or whatever it is called now) for kepubs, and that uses WebKit or something like that, unless Kobo has explicitly blocked something they support, then you will see mixed function like this.

- It's possible you need to do something else to indicate the event has been consumed and isn't to be passed on to the next consumer. In other windowing environments, I have done this by setting a flag or it is based on the return value of the function. I have no idea what this would be in this case.

Also, there is a page somewhere that tests ereaders and apps for epub3 support. This lists what the Kobo ereaders do support from their testing. Finding that and seeing what it says might give you an idea of what can be done.
davidfor is offline   Reply With Quote
Old 12-30-2016, 11:35 AM   #5
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Try http://epubtest.org

It appears that the Kobo e-readers are in the Archived section of test results.
PeterT is offline   Reply With Quote
Advert
Old 12-30-2016, 07:44 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
From having to deal implementing this myself -- most likely the Kobo will turn off the default page turn behavior only if it detects the tap occurred inside a link element. So put your clickable text inside <a href="javascript: void(0)">...</a> elements.
kovidgoyal is offline   Reply With Quote
Old 01-04-2017, 08:14 AM   #7
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 554
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Why javascript:void(0)?
fbrzvnrnd is offline   Reply With Quote
Old 01-04-2017, 09:55 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Because that tells the user agent that this link involves some javascript processing, which means it does not get added to the history does not change color when clicked, etc.
kovidgoyal is offline   Reply With Quote
Old 01-10-2017, 02:43 AM   #9
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 554
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
I tried and I got some good things and some bad ones: the epubcheck seems to have problem with void; touching the <a> elements do not turn the page; but the events associated to the span element inside the <a> are not activated. I have also a problem with text colors, it seems Kobo do not follow my css a[href] asking for black color.
I also tried it in <a> inside a svg, but it seems it is not working.
fbrzvnrnd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] ePub3-itizer - epub3 output plugin for Sigil KevinH Plugins 435 01-19-2023 09:46 PM
Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) SJC-Caron ePub 18 04-21-2016 11:10 AM
Epub3 XHTML Validation epub3 Ramesh Arpitha ePub 5 06-30-2014 08:32 PM
Is there a way to import kepub to calibre/convert a kepub to other formats? Major General Library Management 9 04-08-2014 10:00 PM
New Errors Converting epub3 -> zip -> epub3 Lola25 ePub 2 11-12-2013 09:37 PM


All times are GMT -4. The time now is 07:30 AM.


MobileRead.com is a privately owned, operated and funded community.