Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2018 at 13:56 UTC
Updated:
30 Nov 2018 at 18:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kevineinarsson commentedPatch attached.
Comment #3
vunda commentedI run into the same problem
https://www.drupal.org/project/bootstrap/issues/2966620
Comment #4
kevineinarsson commentedIt seems that the Bootstrap jQuery UI Modal Bridge (
modal.jquery.ui.bridge.js) does toggle the modal if the property is set, but it isn't always loaded - only if the drupal.dialog library is loaded as far as I can tell.Wouldn't it make sense to put this in the common modal.js? Updated patch attached.
Comment #5
markhalliwellThis shouldn't be removed. It's necessary in some special cases where some jQuery UI dialogs might already be "initialized" but aren't shown when they should be.
This "looks" ok... but maybe it should also check if
!data.options.jQueryUiBridge?Comment #6
kevineinarsson commentedThanks Mark, updated the patch.
Comment #8
kevineinarsson commentedBuild successful puts the issue to needs work? I'm confused.
Comment #9
markhalliwellI cannot reproduce this issue using https://getbootstrap.com/docs/3.3/javascript/#live-demo and the latest code.
Comment #10
kevineinarsson commentedHi Mark!
The issue still exists in 8.x-3.x if the option jQuery UI Bridge is disabled under the theme settings, in which case the modal_show setting isn't being respected.
I attached a module to easily reproduce the issue.
1. Enable and use the Bootstrap theme
2. Set jQuery UI Bridge to false in the theme settings
3. Enable the foo module
4. Visit /foo
The modal won't toggle when the button is clicked, regardless if modal_show is true or false ('Shows the modal when initialized' in the modal theme settings). The patch in #6 checks if we're meant to toggle on init (data.options.show/modal_show) and that jQuery UI Bridge isn't enabled since it also handles toggling on init.
**Edit: For some reason the .tar.gz got renamed to .tar_.gz when uploaded to d.o., but it should still work... let me know if not
Comment #11
markhalliwellOk, I was able to take a look at this is more depth. Sorry, this is indeed a legitimate bug.
Primarily because the functionality defined on the following line was removed:
https://github.com/twbs/bootstrap/blob/df08d95495cf3cd9278099dc91c630423...
Furthermore, I've discovered that the relatedTarget isn't actually passed as it should be.