Your software
My Mautic version is:
My PHP version is: 8.2
Your problem
My problem is:
I have created Focus Item → Modal (Popup) that contains just an clickable image. The problem is when I visit a page on mobile device - the popup doesnt fully load on page. It loads like it was set to 10px height, and sometimes when I scroll up it loads with full size.
Does anyone else had this problem before and fixed it?
Here is an example how the focus item displays when I visit the page on mobile:
and the styles: .mf-modal{background:transparent;padding:0;border:0;}.mf-content{margin-bottom:0 !important;}.mf-modal-close{top:0 !important;right:0 !important;background:#fff;width:24px;}
The console error Uncaught TypeError: Cannot read properties of undefined (reading 'style') means that the script is trying to access the style property of an element that may not be properly defined or initialized. This could be caused by several factors, possibly related to your CMS:
CMS restrictions: Check if your CMS is blocking external iframes or if a security plugin/tool is preventing external scripts from loading.
Plugin conflicts: If your CMS has multiple plugins, try disabling them one by one to see if any are interfering with the Focus Item.
Script modifications: Did you copy the script exactly as provided, or did you make any modifications? If so, ensure that no critical elements were removed or altered.
To further diagnose the issue:
Instead of adding CSS under the “Custom CSS” section, try placing it directly within <style> tags inside the “HTML” section.
Ensure that the Focus Item is correctly configured in Mautic.
Test the Focus Item on a clean test environment (e.g., a simple HTML page or Clean CMS or security/tools plugins) to see if the issue continues.
Hope this helps. Let me know if it works.
Best regards,
Ricardo
AI has limited knowledge regarding Mautic and its tools, as not everything is documented. What you’re saying is categorically false.
If you believe my response was AI-generated, feel free to ask AI the same question and compare the results. This will only confirm my point.
Have you actually tested the solutions I suggested, or are you relying on AI to magically solve everything for you? Troubleshooting requires effort.
When someone takes time - especially on a weekend - to help you, a more respectful and appreciative attitude would be expected. The community thrives on mutual respect.
If you’re not interested in genuine help, I wont waste my time further.
No no no, sorry mate. If you misconstrue my tone. I apologize. I didn’t mean to offend you. I was just saying that AI also gave mi similar answer as you did.
The problem is that this image is widther than the original focus modal item in Mautic. For example below is an example without any custom CSS code:
I apologize for misinterpreting your message earlier. Regarding your situation, there’s actually a straightforward solution since you’re familiar with CSS and HTML.
I recommend editing the image to remove the text and logo while keeping the visual elements. Then apply it as a background for the focus item in Mautic. You can add the text directly within Mautic, utilizing custom fonts by calling them with HTML, and incorporate the logo next image - always respecting the iFrame size.