Skip to content

Conversation

@Digvijay-x1
Copy link
Contributor

@Digvijay-x1 Digvijay-x1 commented Dec 4, 2025

Fixes : #18736

Hey friends ,

I have tried to fix the disappearing bug when clicking "EDIT" .
My findings ,
I think the global comment.js will close other forms when clicked "EDIT" by programmatic clicking "Cancel" button.
I think this is that part in comment.js

// Toggle visibility of edit form of the same comment
$(document).on('click', '[id*="reply_button_of_"]', function (e) { const idNumber = $(e.target).attr('id').split('reply_button_of_')[1]; $('#edit_form_of_' + idNumber + ' .cancel-comment').click(); });

Now the inline_comment.js.erb is too broad and will listen to any .cancel-comment and will reset the thread .

$("#comment<%= @line %>").on('click', '.cancel-comment', function (e) {

So i changed it to be more specific and only work for .cancel-comment from the new comment .

Result :

Screencast.From.2025-12-04.18-04-34.mp4

Thanks !

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label Dec 4, 2025
@eduardoj eduardoj added the review-app Apply this label if you want a review app started label Dec 4, 2025
@obs-bot
Copy link
Collaborator

obs-bot commented Dec 4, 2025

Review app will appear here: http://obs-reviewlab.opensuse.org/digvijay-x1-fixdiff_comment

Copy link
Contributor

@krauselukas krauselukas left a comment

Choose a reason for hiding this comment

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

Great! Thanks @Digvijay-x1

@krauselukas krauselukas merged commit c7785c6 into openSUSE:master Dec 9, 2025
33 checks passed
@Digvijay-x1 Digvijay-x1 deleted the fix/diff_comment branch December 9, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Things related to the OBS RoR app review-app Apply this label if you want a review app started

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editing a new diff comment causes it to disappear

4 participants