-
- Downloads
There was an error fetching the commit references. Please try again later.
Utilize :key to minimize extra rerenders
The diff notes automatically focus on mount, and when using the index (as opposed to line_code) for the v-bind:key, the comment form gets unnecessarily remounted, and therefore refocused.
Showing
- app/assets/javascripts/diffs/components/inline_diff_view.vue 1 addition, 1 deletionapp/assets/javascripts/diffs/components/inline_diff_view.vue
- app/assets/javascripts/diffs/components/parallel_diff_view.vue 2 additions, 2 deletions...ssets/javascripts/diffs/components/parallel_diff_view.vue
- app/assets/javascripts/diffs/store/utils.js 11 additions, 0 deletionsapp/assets/javascripts/diffs/store/utils.js
- changelogs/unreleased/51606-expanding-a-diff-while-having-an-open-comment-form-will-always-scroll-down-to-the-comment.yml 5 additions, 0 deletions...n-comment-form-will-always-scroll-down-to-the-comment.yml
- spec/javascripts/diffs/store/utils_spec.js 18 additions, 2 deletionsspec/javascripts/diffs/store/utils_spec.js
Please register or sign in to comment