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

Unbind keydown listeners when Alert modals are closed. #4869

Merged

Conversation

mabashian
Copy link
Member

SUMMARY

This fixes a bug where attempting to hit enter in any sort of textarea would be ignored if the user had previously encountered an Alert modal while navigating throughout the application.

There are two other places where listeners are set up for the enter key. One is on the login modal and the other is a directive that we use on inputs. Both of those listeners are scoped to specific elements and shouldn't impact the enter key throughout the app. The code changed here binds a listener to the entire document so when you hit an Alert the enter key would previously be foobar until you manually refresh the page. I'm pretty confident this is what's been happening when folks report that they're unable to hit the enter key on certain textareas.

One of the easier ways to reproduce this bug (before the fix) was to create a new personal access token. When you create the token, an Alert modal is shown with a key in it. If you then went to any textarea in the application and attempted to hit enter it would not take you to a new line.

link #4192

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • UI

This fixes a bug where attempting to hit enter in any sort of textarea would be ignored if the user had previously encountered an Alert modal while navigating throughout the application.
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Contributor

@jlmitch5 jlmitch5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 329630c into ansible:devel Oct 2, 2019
@dsesami dsesami mentioned this pull request Oct 9, 2019
@mabashian mabashian deleted the 4192-enter-textarea branch March 31, 2020 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants