Problem/Motivation

There are 2 methods present in ajax_comments.js, which won't work with jquery versions 1.6 and higher.
attr('scrollHeight') doesn't work for jquery > 1.6
we have to use prop() instead.

@ -57,7 +57,7 @@ Drupal.behaviors.ajaxComments = {
  */
 function ajaxCommentsScrollForm(commentNumber) {
   pos = $('#comment-wrapper-' + commentNumber).offset();
  height = $('#comment-wrapper-' + commentNumber + ' .comment').attr("scrollHeight");

Proposed resolution

Create a helper function to make the code compatible with all jquery versions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

micbar’s picture

Status: Active » Needs review
FileSize
1.27 KB

Here is the patch with the proposed resolution.

muschpusch’s picture

Assigned: Unassigned » muschpusch
Status: Needs review » Reviewed & tested by the community

looks good too

muschpusch’s picture

Status: Reviewed & tested by the community » Closed (fixed)

committed to current dev