#4343 Fix previewing comment when there are two comment forms open
Closed by pingou. Opened by pingou.
fix_preview  into  master

Download 4343.patch

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

rebased onto 3b95c8ac3771bb39ddb689f70b4773f3bacbc6d9

Pull-Request has been closed by pingou

Metadata