Problem/Motivation

When using the Bootstrap theme with the entity browser module, I realized, that the modal JavaScripts have some problems:

  • dialog:beforeclose and dialog:afterclose events are only fired, when the modal is closed via closeDialog() function
  • Current dialog.js and dialog.ajax.js differ from core's ones

Proposed resolution

  • Rework dialog JS scripts to be up to date with core's ones
  • Ensure all events are fired correctly (e.g. by leveraging/binding Bootstraps *.bs.modal events to trigger appropriate events required for Drupal

Remaining tasks

  • Rework JS files to be up to date with core
  • Ensure triggering of appropriate events

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hctom created an issue. See original summary.

stan.ag’s picture

Category: Task » Bug report

I confirm that this issue is still actual after 8.x-3.1 release. Changing category to "Bug report" as it actually breaks functionality in some cases ('Entity browser' module being an example, as it relies on 'dialog:beforeclose' event which is not fired if dialog is closed manually).

stan.ag’s picture

A quick patch to fix core dialog events.

stan.ag’s picture

In previous patch, 'show.bs.modal.drupal' and 'hidden.bs.modal.drupal' events weren't fired. I removed the first event (thus restored original code) and changed dialog.ajax.js in order to fire the last one.

gge’s picture

File Entity Browser doesn't work Bootstrap 8.x-3.x-dev (22 Mar 2017) patched width #4. Thanks

maxplus’s picture

Having the same issue as #5, entity browser modal not closing after submit in current 8.x-3.3

markhalliwell’s picture

Status: Active » Closed (duplicate)
Related issues: +#2831237: Bootstrap modal does not work well with jQuery UI dialog