I believe I've found an impending issue that will hit when 8.7 is released. #2822778: Modal popups in views is not showing properly when toolbar tray is upon modal has set modal dialog z-index to 601, which is getting covered by Bootstrap's .modal-backdrop z-index of 1040.

#3037636: [regression] Dialog modals can no longer be stacked is working on removing the hardcoding, but even the current solution there is still setting the dynamic z-index via JS.

I'm not familiar enough with the Bootstrap framework to know how much disruption there would be by including an override in the starterkits? Overriding the JS variable would be cleaner, but that can't really be addressed until the patch lands, and that's currently slated for 8.8.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

akalata created an issue. See original summary.

Anatoliy Vorobyov’s picture

FileSize
508.42 KB
137.73 KB

@akalata you are right in Bootstrap we have such z-index:
$zindex-modal-background: 1040;
$zindex-modal: 1050;
And 1040 higher than 600 or 601, so Bootstrap popup will be above all.
And solution was same, to show modal above all content: https://www.drupal.org/project/drupal/issues/2822778

Even if you will use Bootstrap as admin theme, "jquery.ui" popup used and there are no Bootstrap modal, and if it would be, 1040 higher than 601, so you will not have problems.

I believe that Bootstrap is best Drupal theme but not for "Administration theme".

I will also attach screenshot how "/admin/structure/views/view/content" looks when Bootstrap used as "Administration theme".

markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

AFAIK, we're not handling the zIndex property at all in the bridge... mainly because this is a core CSS style/jQuery implementation, not a jQuery UI dialog method.

I'm not entirely sure there is going to be a "best approach" on how to handle this. I'm half tempted to mark this a dup of the core issue and force them to fix it. JS/jQuery shouldn't hardcode styles, they should use classes.

That being said, I know I have some client code that handles modal z-indices manually because it can have multiple modals open and stack on top of each other. I've been toying with the idea of forward-porting this back into the base theme (it's a common enough situation I think).

What I'm unsure about though is that it really won't matter either way if some core/contrib JS code is manually/arbitrarily setting the z-index via $.css() on the modal element after initialization. There really isn't much we can do about that.

For now, I'm going to leave this as postponed until we have a better idea of what's going on.

waverate’s picture

Status: Postponed (maintainer needs more info) » Active

I'm running into this problem using Bootstrap for node/edit after upgrading to D8.7. Using core CKEditor link button brings up <div class="modal-backdrop fade in"></div>. However I am unable to select anything in the modal.

It requires z-index below 601 in order to work:

.modal-backdrop {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 600;
	background-color: #000;
}
markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

This doesn't provide us with any new information.

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This is definitely a core issue, I responded here: #3037636-22: [regression] Dialog modals can no longer be stacked.

DanChadwick’s picture

Status: Closed (duplicate) » Closed (outdated)

Fixed in drupal 8.8.x-dev bc68273.

andres.torres’s picture

Status: Closed (outdated) » Needs work
Related issues: +#3037636: [regression] Dialog modals can no longer be stacked

Reopening the bug since on a fresh Drupal 8.7.4 with Bootstrap 8.4 the issue persists, pls see comment on Drupal core fix here:
https://www.drupal.org/project/drupal/issues/3037636#comment-13181499

markhalliwell’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2822778: Modal popups in views is not showing properly when toolbar tray is upon modal

This is a core issue. The commits have already been reverted: #2822778-110: Modal popups in views is not showing properly when toolbar tray is upon modal.

andres.torres’s picture

Can confirm that on a fresh Drupal core 8.7.4 and Bootstrap 8.x-3.19 the issue is not present so the issue points to the latest Bootstrap release.

andres.torres’s picture