| 
			
			 | 
		#1 | 
| 
			
			
			
			 Fanatic 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559 
				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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,698 
				Karma: 79983758 
				Join Date: Nov 2007 
				Location: Toronto 
				
				
				Device: Libra H2O, Libra Colour 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Do the specifications for what is / isn't supported help? See https://github.com/kobolabs/epub-spec
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Fanatic 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559 
				Karma: 400004 
				Join Date: Feb 2009 
				
				
				
				Device: ONYX M96 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 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.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905 
				Karma: 47303824 
				Join Date: Jul 2011 
				Location: Sydney, Australia 
				
				
				Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 - 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.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,698 
				Karma: 79983758 
				Join Date: Nov 2007 
				Location: Toronto 
				
				
				Device: Libra H2O, Libra Colour 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Try http://epubtest.org 
		
	
		
		
		
		
		
		
		
		
		
		
	
	It appears that the Kobo e-readers are in the Archived section of test results.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				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.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Fanatic 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559 
				Karma: 400004 
				Join Date: Feb 2009 
				
				
				
				Device: ONYX M96 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Why javascript:void(0)?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				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.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Fanatic 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559 
				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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| [Plugin] ePub3-itizer - epub3 output plugin for Sigil | KevinH | Plugins | 457 | 05-28-2025 07:14 PM | 
| Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) | SJC-Caron | ePub | 18 | 04-21-2016 12:10 PM | 
| Epub3 XHTML Validation epub3 | Ramesh Arpitha | ePub | 5 | 06-30-2014 09: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 11:00 PM | 
| New Errors Converting epub3 -> zip -> epub3 | Lola25 | ePub | 2 | 11-12-2013 10:37 PM |