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

Backport of UI Bug fix, cursor jumps in KVv2 after initial input into release/1.15.x #27127

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #27120 to be assessed for backporting due to the inclusion of the label backport/1.15.x.

The below text is copied from the body of the original PR.


This was a fun one 🕵🏻‍♀️.

Regression PR (I think, but I'll test on 1.15.x to make sure)
Fixes Issue #26634

  • Codemirror's setValue resets the cursor position.
  • It was being called in the modifier because the following condition was passing this._editor.getValue() !== namedArgs.content
  • The reason these values did not match was because we had in—KVv2 only— set the default value as a flat json object without whitespace:
    image
    vs what Codemirror's namedArgs.content is set at by default:
    image

This is not an issue in Cubbyhole which is how I found the solution to match the objects. TLDR, I used this function to figure out what we needed and brought it into the kv-data-fields component to properly set the starting value, tada!

Bug:

bug-jump.mov

With Fix:

fix-jump.mov

Overview of commits

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 20, 2024
@Monkeychip Monkeychip added this to the 1.15.9 milestone May 20, 2024
Copy link

Build Results:
All builds succeeded! ✅

Copy link

CI Results:
All Go tests succeeded! ✅

@Monkeychip Monkeychip merged commit f6e64d3 into release/1.15.x May 20, 2024
27 of 29 checks passed
@Monkeychip Monkeychip deleted the backport/ui/VAULT-27230/cursor-jumps/deadly-discrete-mayfly branch May 20, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants