-
Notifications
You must be signed in to change notification settings - Fork 24
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
CNV-32923: Fix clicking enter after copy console #1553
CNV-32923: Fix clicking enter after copy console #1553
Conversation
Signed-off-by: Matan Schatzman <mschatzm@redhat.com>
@metalice: This pull request references CNV-32923 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one question :)
onInjectTextFromClipboard={(e: MouseEvent<HTMLButtonElement>) => { | ||
e.currentTarget.blur(); | ||
e.preventDefault(); | ||
rfb?.sendPasteCMD(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to focus on the console section too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. rfb.focus()
but I didn't like it as it makes the screen jump down
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: avivtur, metalice The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
📝 Description
When clicking paste in the console screen the button stays in focus and when clicking enter it pastes again.
the fix is those 2 lines of code:
e.currentTarget.blur();
e.preventDefault();
the rest is to remove React.*
🎥 Demo