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

Fix issue with configmap description and pressing space shifting focus #13509

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

aalves08
Copy link
Member

Summary

Fixes #13506

Occurred changes and/or fixed issues

  • update wrongly used patterns for computed properties using $refs

Technical notes summary

  • Just learned that $refs aren't reactive and in the first evaluation of a computed they are always undefined, which in conjunction with the condition this.isCodeMirrorContainerFocused && (ev.code === 'Enter' || ev.code === 'Space') triggered the focus (this.isCodeMirrorContainerFocused => this.currFocusedElem === this.$refs?.codeMirrorContainer => undefined === undefined).

Areas or cases that should be tested

  • Import YAML modal (triggered from header)
  • configmap, as per original issue
  • ContainerShell -> opening terminal and clicking space

Areas which could experience regressions

Screenshot/Video

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@aalves08 aalves08 self-assigned this Feb 25, 2025
@aalves08 aalves08 added this to the v2.11.0 milestone Feb 25, 2025
Copy link
Member

@rak-phillip rak-phillip 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 an resolves the issue. I just wonder if we could be more clear about our intent by storing the ref instead.

@aalves08 aalves08 requested a review from rak-phillip February 25, 2025 18:10
@aalves08 aalves08 merged commit 9664a29 into rancher:master Feb 26, 2025
31 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.

Configmaps create -> hit space on description causes focus to shift to another UI element
2 participants