Missing dialog options when using GET method

Created on 6 December 2023, 12 months ago
Updated 25 January 2024, 10 months ago

Problem/Motivation

Drupal core recently introduced the ability to use GET on Ajax requests ( https://www.drupal.org/project/drupal/issues/956186 πŸ“Œ Allow AJAX to use GET requests Fixed ). Using GET on dialog requests, including in core and this module, results in the dialog options being lost. A related issue has already resolved the bug in the core dialog renderer ( https://www.drupal.org/project/drupal/issues/3394220 πŸ› Dialog options are not honoured when open a dialog using GET Needs work ).

Steps to reproduce

  1. Setup a modal link (see example below)
  2. Click on the modal link
  3. Observe the dialog options not being applied
<a href="/" class="use-ajax" data-ajax-type="GET" data-dialog-type="bootstrap4_modal" data-dialog-options="{&quot;dialogClasses&quot;:&quot;modal-dialog-centered modal-lg modal-dialog-scrollable&quot;}">Open Modal</a>

Proposed resolution

Adapt the Drupal core fix to this modules dialog renderer.

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robphillips

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024