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

SDA-4322: About Symphony - Unable to dismiss the pod URL editor by pressing ESC key #1965

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

NguyenTranHoangSym
Copy link
Contributor

Description

Add ability to:

  • Dismiss PodURL via pressing ESC
  • Revert to previous "ENTER" PodURL

Related PRs

@NguyenTranHoangSym NguyenTranHoangSym self-assigned this Oct 2, 2023
@NguyenTranHoangSym NguyenTranHoangSym marked this pull request as ready for review October 2, 2023 08:54
@@ -276,6 +277,15 @@ export default class AboutApp extends React.Component<{}, IState> {
const { value } = e.target;
this.setState({ updatedHostname: value });
this.handlePodInputBlur(e);
this.previousUrl = value;
}
if (e.keyCode === 27) {
Copy link
Contributor

Choose a reason for hiding this comment

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

27 looks like a magic number here, what about defining this keyCode in a const or maybe something like

Suggested change
if (e.keyCode === 27) {
if (e.key.toLowerCase() === 'escape') {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Im not sure this is a magic number but it is predefined for both mac and windows. I so I bet it will just work. Let me enwrap it in a constant

@NguyenTranHoangSym NguyenTranHoangSym merged commit 244468a into finos:main Oct 5, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants