Open smulvih2 opened 3 years ago
Appears forcing the overlay to trigger is interrupting initialization when multiple overlays on the page.
I don't have a fix, but short term you can do this till someone figures out why.
$( document ).on( "wb-ready.wb-overlay", ".wb-overlay", function( event ) {
$(document).trigger("open.wb-lbx", [[{
src: "#frl-modal",
type: "inline",
}], true ]);
});
I'm using Drupal WxT which comes with a modal in the footer for the social share links. When I add a second modal and initialize it, both modals show "undefined" as the close button text.
Modal markup:
Initializing modal:
After initializing the modal this is the markup:
Adding .modal-footer to my modal markup doesn't make any difference.
Here is a patch that shows where the issue seems to be occuring:
For some reason i18nText doesn't return the correct text in this scenario.
To Reproduce Add two modals to a page and initialize them.
Expected behavior Expected behavior is that both modals use the correct close button text, with translation on French page.
Additional information
Version of WET-BOEW v4.0.38 - 2020-09-18
Desktop/Smartphone
Screenshots![Capture](https://user-images.githubusercontent.com/6674520/117325402-8a3a8700-ae45-11eb-97b7-c0ea5674d99c.JPG)