Closed janschoenherr closed 3 years ago
While it's true that it is mostly used in the backend, there are apparently a few instances where modals are also used in frontend. Protostar has some field overrides (eg for media manager and content versioning) which to my knowledge do the exact same thing as I do in SermonSpeaker.
I can have a look this evening if I see something different.
@janschoenherr From what I see the code I use is quite similar to what Joomla core does for the "Version" button and "Intro Image" and "Full Article Image" fields. Especially the latter two also define the modal within the field (which is architecturally correct). But I see that these are overrides of the core layouts for Protostar, so by default I guess the old Mootools modals are used by core. May it be that Yootheme works fine with the Mootools modals but not so much with the Bootstrap variant? Then I could look at implementing a toggle to switch between the two variants, allthough I tink the Bootstrap one is superior to the Mootools one 😄
Thanks @Bakual. The Joomla menu module seems to be using the bootstrap modal in the frontend too. We'll fix this on our side.
Thanks!
Hi,
currently the field modals are rendered within the field itself. If any of their ancestor DOM elements have a stacking context (e.g.
position: relative; z-index: 0;
), the bootstrap modal will be hidden behind its overlay. Would it be possible to attach the modals to the<body>
instead?I looked through Joomla and it seems
JHtml::_('bootstrap.renderModal')
is usually used in the administrator area only.https://github.com/Bakual/SermonSpeaker/blob/34ccfa9d2416cc47d9118dd49d82afea0d728e29/com_sermonspeaker/admin/models/fields/modal/speaker.php#L205