MyBB Group
MyBB Modal Appearance Fix - Printable Version

+- MyBB Group (https://mybb.group)
+-- Forum: Beside You (https://mybb.group/Forum-Beside-You)
+--- Forum: Troubleshoot (https://mybb.group/Forum-Troubleshoot)
+--- Thread: MyBB Modal Appearance Fix (/Thread-MyBB-Modal-Appearance-Fix)



MyBB Modal Appearance Fix - effone - 08-05-2019

We have seen several support threads about the modal content is appearing at the bottom of page with no overlay.
Well, here is the fix.

There is a bug in js code and the chaining fails, and MyBB.popupWindow(); simply appends the modal code to the body. But the plugin fails to initiate.
So if we break the chain, the issue gets resolved.

Lets break it.
Open general.js and go to line 107, find this line:
$(html).appendTo('body').modal(options);

Now change the line to:
$(html).appendTo('body').addClass('lastModal').hide();
$('.lastModal').removeClass('lastModal').modal(options);

Save the file, hard refresh / clear cache of your browser and load the page, fire a modal you were having the issue with. Its resolved now.