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

Hitting enter on a link triggers previousSlide #82

Closed
jaylandro opened this issue May 20, 2019 · 0 comments
Closed

Hitting enter on a link triggers previousSlide #82

jaylandro opened this issue May 20, 2019 · 0 comments

Comments

@jaylandro
Copy link
Contributor

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

@jaylandro jaylandro changed the title Hitting enter on a link triggers previousSlide Hitting enter on a link triggers **previousSlide** May 20, 2019
@jaylandro jaylandro changed the title Hitting enter on a link triggers **previousSlide** Hitting enter on a link triggers previousSlide May 20, 2019
jaylandro added a commit to jaylandro/eagle.js that referenced this issue May 20, 2019
This is a proposed fix for a click event being emitted by keyboard navigation on a link.

Issue described below
Zulko#82 (comment)
jaylandro added a commit to jaylandro/eagle.js that referenced this issue May 20, 2019
jaylandro added a commit to jaylandro/eagle.js that referenced this issue May 20, 2019
… was on the left or right hand of the screen. Changed the logic to check for href of target Zulko#82
yaodingyd pushed a commit that referenced this issue May 20, 2019
* Check if click event came from keyboard  #82

This is a proposed fix for a click event being emitted by keyboard navigation on a link.

Issue described below
#82 (comment)

* Linting fixes for Travis CS Issue #82

* Realized this could happen on a regular click event as well if a link was on the left or right hand of the screen. Changed the logic to check for href of target #82

* Started running lint locall,y apologies for all the commits
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