Problem/Motivation

When an ajax request is made, the ajaxCompleteHandler isn't properly bound to the ajaxComplete event. .ajaxComplete() is deprecated in jQuery 3.3. In addition, as of jQuery 1.9, ajaxComplete must be attached to the document or else it won't be triggered.

As of jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with .on( "ajaxComplete", ... ), must be attached to document.

Steps to reproduce

Set a breakpoint inside ajaxCompleteHandler via a web inspector. Trigger an autosave. The breakpoint should be triggered but is not.

Proposed resolution

Bind ajaxComplete to the document via .on('ajaxComplete', ...)

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

pixelwhip created an issue. See original summary.

pixelwhip’s picture

Status: Active » Needs review
rymcveigh’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed these changes, and they look good to me. Thanks @pixelwhip!

The PHPStan, eslint, and test fails are not related to the changes made in this MR.

rymcveigh’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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