kobolabs / Kobo-Reader

http://www.koboereader.com/
585 stars 126 forks source link

Disabling Menu Activation for Interactive Elements on eInk Kobo! #99

Open mrbbp opened 3 years ago

mrbbp commented 3 years ago

hello, i tried the code example to catch touchevent on my kobo aura (N514) with 4.20.14622 and kepub extension

document.querySelector("main").addEventListener('click', handleClick, false);
 document.querySelector("main").addEventListener('touchstart', handleTouch, false);

function handleClick(event) {
    event.preventDefault();
}

function handleTouch(event) {
    exampleElement.style.background="red";
    event.preventDefault();
}
  }

but the main menu interact over the script. what's wrong? Impossible to pass over the menu.

I'm looking for to generate page content when touch to change page...

An alert() don't works too (for debugging).

mrbbp commented 3 years ago

i can provide an epub for testing...