Problem/Motivation

Drupal.behaviors.ajaxCommentsBehavior prevents the default click event on the Comment links. However, this event is already prevented from triggering by Drupal.Ajax so this code can be safely removed.

Proposed resolution

Remove redundant preventDefault on comment links.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 core-once-3303854-2.patch878 bytesomkar-pd
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

idebr created an issue. See original summary.

omkar-pd’s picture

Status: Active » Needs review
StatusFileSize
new878 bytes
idebr’s picture

Title: Replace jQuery.once with core/once library » Remove redundant preventDefault on comment links
Issue summary: View changes
Status: Needs review » Needs work

On second thought, the preventDefault() calls on the comment links are redundant: Drupal.Ajax already prevent the default event from triggering, so the Drupal.behaviors.ajaxCommentsBehavior can be safely removed.

idebr’s picture

Status: Needs work » Needs review

  • idebr committed ba50dad on 8.x-1.x
    Issue #3303854 by idebr, omkar-pd: Remove redundant preventDefault on...
idebr’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.