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

When Informer notification closes, metaField input focus changes #4442

Closed
2 tasks done
insanity54 opened this issue May 6, 2023 · 2 comments · Fixed by #4939
Closed
2 tasks done

When Informer notification closes, metaField input focus changes #4442

insanity54 opened this issue May 6, 2023 · 2 comments · Fixed by #4939
Assignees
Labels

Comments

@insanity54
Copy link

insanity54 commented May 6, 2023

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

https://codesandbox.io/p/sandbox/frosty-sunset-teevtq

Steps to reproduce

  • Add a file to the Dashboard
  • While the notification is open, edit the file's first metaField
  • While the notification is still open, tab to the second metaField
  • Wait for notification to close
uppy-bug2.mp4

In this video example of the bug, I'm typing "example" in the first metaField, pressing tab to get to the second metaField, then repeatedly typing "hello world" in the second metaField. The third instance of "hello world" appears in the first metaField, even though I did not press a button to put focus there.

Expected behavior

When typing in the second text input field, focus should not switch when the Informer notification closes

Actual behavior

When the Informer notification closes, focus is switched to the first metaField

@lakesare
Copy link
Contributor

lakesare commented Feb 14, 2024

Can reproduce this in Chrome and in Firefox, this happens only for { inline: true } mode; and only after full page reload.
Thanks for the report, will take a look.

@lakesare
Copy link
Contributor

This is the expected behaviour - the idea here is that the screen reader (for the blind people) should have time to read the Informer message, and then focus jumps to the main element of the current screen (in this case, it's the first input field "Source").

In your use case, the best way to avoid this refocus is probably either:

  • shorter Informer message duration, or
  • attaching the custom event to the edit button, and, when the user clicks on it, running uppy.setState({ info: [] }).

I will close this now, but if anyone has similar refocus issues due to Informer - please reopen.

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

Successfully merging a pull request may close this issue.

3 participants