Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touch event does not work on eink kobo? #52

Open
mrbbp opened this issue May 4, 2020 · 2 comments
Open

touch event does not work on eink kobo? #52

mrbbp opened this issue May 4, 2020 · 2 comments

Comments

@mrbbp
Copy link

mrbbp commented May 4, 2020

hello, i tried your code exemple 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 my script.
what's wrong?

oh and alert() don't too (for debugging).

@mrbbp
Copy link
Author

mrbbp commented Aug 6, 2020

nobody answer?
Any idea?
is it the good place for asking an upgrade?
é.

@daniel-j
Copy link

daniel-j commented Sep 22, 2020

The spec states:

Kobo’s eInk and Desktop platforms have limited support for JavaScript, and do not support interactive JavaScript elements.

Also, your code isn't complete: How is the main element used in your markup? Where is exampleElement defined? Extra trailing }

Instead of alert or console.log you can append nodes or set innerHTML of an element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants