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

Enter Keypress on Parent triggers mouse click of Inner child followed by parent click #8326

Closed
sanjay1909 opened this issue May 23, 2018 · 9 comments
Labels
Abandoned requested reports or updates are missing since more than 1 year, author or users are not available.

Comments

@sanjay1909
Copy link

Steps to reproduce:

A list of the steps you take to demonstrate the problem.
https://codepen.io/sanjay1909-the-lessful/pen/erozeP
Try with NVDA to see the Issue mentioned in Title
Kill the NVDA app and try
Experimented in Browser: Firefox and Chrome

Expected behavior:

Expected behavior is What you see in that example when NVDA app is killed
Keypress should call kyepress event listeners
focus shouldn't shift to an inner child for Enter|space key

Actual behavior:

Keypress calling Mouse event listeners
focus shifting to an inner child for Enter|space key

System configuration:

NVDA version: 2018.1

NVDA Installed or portable:

Windows version:

Example: Windows 10 Pro Version 1803

Name and version of other software in use when reproducing the issue:

Other questions:

Does the issue still occur after restarting your PC? Yes

Have you tried any other versions of NVDA?

No

@sanjay1909
Copy link
Author

Summary of the Issue

  1. Focus Shifts to inner Child When we press Enter or Space Key. As a result, child click event happens before parent click event.
  2. KeyPress Triggers Mouse click event

Issue 2 was addressed here, #4903 . Thanks

@derekriemer
Copy link
Collaborator

Was this in browse or focus mode.

@sanjay1909
Copy link
Author

sanjay1909 commented May 23, 2018

It's in Browse Mode with Checkbox selected for Automatic focus for focus changes

https://codepen.io/anon/pen/MGdYRW
In this example, I removed the tabindex on the child, But still, the click event attached for the

  1. child got executed and
  2. Executed first before the parent

@sanjay1909 sanjay1909 changed the title Keypress triggers mouse click. focus shifting to Inner child upon keypress Enter Keypress on Parent triggers mouse click of Inner child followed by parent click May 23, 2018
@Adriani90
Copy link
Collaborator

cc: @jcsteh, @feerrenrut I think I can reproduce this issue in NvDA 2019.1.1 but since I canot use a pc without a screen reader I cannot really tell what happens when testing without NVDA running.

@feerrenrut
Copy link
Contributor

Without getting into the details, I'm not 100% sure what the test code is telling us. I got the following results without NVDA running:
Pressing space with the parent div focused

ParentClick[0] ParentKeypress[1] ChildClick[0] ChildKeypress[0] 
- parentKeyPress

Clicking on the child div:

ParentClick[1] ParentKeypress[0] ChildClick[1] ChildKeypress[0] 
- childClick - parentClick

This issue requires work to clarify. The template has not been followed correctly and the expected results of the test case are also not explained. There should also be some explanation as to why the expected behaviour should be the case. The issue is unlikely to get worked on in it's current state.

@Adriani90
Copy link
Collaborator

@sanjay1909 how is this behavior in NVDA 2019.3 Beta 1? Could you please give an update?

@SuperAL
Copy link

SuperAL commented Jul 20, 2020

@sanjay1909 try listening to keyup event on child, possible event timeline:

  1. listen to keydown event on parent and trigger keydown
  2. the event handler on parent was triggered and move the focus to child
  3. child receives keyup event and trigger click handler

FYI: I encountered this situation when using material ui component, my solution is to move focus to child on keyup instead keydown.

@Adriani90
Copy link
Collaborator

@sanjay1909 is this still an issue with NvDA 2024.2 or 2024.3 Beta?

@Adriani90 Adriani90 added the Abandoned requested reports or updates are missing since more than 1 year, author or users are not available. label Oct 31, 2024
@Adriani90
Copy link
Collaborator

We didn't hear an update from the initial author upon request since more than 4 years, I am closing as abandoned. if you are still having this issue, please comment and we can reopen.

@Adriani90 Adriani90 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned requested reports or updates are missing since more than 1 year, author or users are not available.
Projects
None yet
Development

No branches or pull requests

5 participants