If you open a form to add an inline comment in a PR, there are suddenly
two #comment field.
So if you go back to the main comment (not inline) and click on preview
the content that gets previewed isn't from the correct form.
With this commit, instead of accessing the first #comment we find in the
DOM, we look for the parent .card and find the #comment there.
If you open a form to add an inline comment in a PR, there are suddenly
two #comment field.
So if you go back to the main comment (not inline) and click on preview
the content that gets previewed isn't from the correct form.
With this commit, instead of accessing the first #comment we find in the
DOM, we look for the parent .card and find the #comment there.
Fixes https://pagure.io/pagure/issue/4315
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr