The ajax loader is being displayed only the first time on type throbber

Created on 23 February 2024, 4 months ago
Updated 10 March 2024, 4 months ago

Problem/Motivation

Drupal has 2 types of ajax progress indicators: throbber and fullscreen. When the progress is of type throbber the ajax loader is triggered (for example after clicking on an ajax link), the ajax loader is displayed properly, but when the event gets fired a second time (if the user clicks again on an ajax link without reloading the page) the ajax loader is not displayed again.

This is happen even when the setting "Always show loader as overlay (fullscreen)" is enabled. In the other hand, fullscreen progress like views works as expected and the ajax loader is displayed across multiple requests.

Steps to reproduce

- Place a link with the class "use-ajax" anywhere on the page.
- Click on the ajax link.
- The ajax loader is displayed.
- After the ajax response, the ajax loader disappear as expected.
- Click again on the ajax link.
- The ajax loader is not displayed.

Proposed resolution

I'm not sure if it's the right solution, but returning always false on the method progressIsSet() when the progress type is throbber will fix the issue.

Remaining tasks

- patch
- review
- test

User interface changes

- None

API changes

- None

Data model changes

- None

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain akalam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024