From: joshuaruesweg Date: Fri, 30 Apr 2021 12:48:57 +0000 (+0200) Subject: Fix collision for comment react button and comment response react button X-Git-Tag: 5.4.0_Alpha_1~12^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8fa301cbd100799dbe3d30fe3de2c67788fa4526;p=GitHub%2FWoltLab%2FWCF.git Fix collision for comment react button and comment response react button The comment react button can bind onto the comment response react button, if there is no comment react button (e.g. because the comment author is the user themselves). Using an own `buttonSelector` for the comment response react button, fixes the problem. Note: The problem only becomes visible if there is only one reaction (so WoltLab Suite uses the legacy like mode). --- diff --git a/com.woltlab.wcf/templates/__commentJavaScript.tpl b/com.woltlab.wcf/templates/__commentJavaScript.tpl index aa34a48960..7cace22764 100644 --- a/com.woltlab.wcf/templates/__commentJavaScript.tpl +++ b/com.woltlab.wcf/templates/__commentJavaScript.tpl @@ -28,7 +28,8 @@ // selectors containerSelector: '#{@$commentContainerID} .commentResponse', summaryListSelector: '.reactionSummaryList', - isButtonGroupNavigation: true + isButtonGroupNavigation: true, + buttonSelector: '.reactButtonCommentResponse' }); }); {/if} diff --git a/com.woltlab.wcf/templates/commentResponseList.tpl b/com.woltlab.wcf/templates/commentResponseList.tpl index 9cd0af5618..90fd8b28e1 100644 --- a/com.woltlab.wcf/templates/commentResponseList.tpl +++ b/com.woltlab.wcf/templates/commentResponseList.tpl @@ -50,7 +50,7 @@
  • {/if} - {if MODULE_LIKE && $commentManager->supportsLike() && $__wcf->session->getPermission('user.like.canLike') && $response->userID != $__wcf->user->userID}
  • {/if} + {if MODULE_LIKE && $commentManager->supportsLike() && $__wcf->session->getPermission('user.like.canLike') && $response->userID != $__wcf->user->userID}
  • {/if} {event name='commentOptions'}