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', ...)
Issue fork webformautosave-3419142
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
Comment #3
pixelwhip commentedComment #4
rymcveighI 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.
Comment #6
rymcveigh