Zulko / eagle.js

A hackable slideshow framework built with Vue.js
https://zulko.github.io/eaglejs-demo/
ISC License
4.08k stars 223 forks source link

Hitting enter on a link triggers previousSlide #82

Closed jaylandro closed 5 years ago

jaylandro commented 5 years ago

When navigating though slides, if a user tries to keyboard tab to a link on one of the slides and use the enter key to navigate to the link (standard browser keyboard navigation) Eagle.js loads previous slide.

This is due to the fact that the browser emits a click event when hitting enter on an Anchor href link. This is caught by the click right side/click left side logic.

image

Checking to see if there are screenX and screenY coordinates catches this.

Reproducible bug Code Sandbox here: https://codesandbox.io/embed/eaglejs-template-1sqlf

PR coming shortly