Hi, I am trying to push a modal to the screen of a dashboard on a button click which is contained within a custom HTML block on my dashboard. Currently, when I click my button, the Modal gets pushed to cover the entire block but not the entire dashboard.
I have read in the Losant documentation that the actual Losant page consists of a group of iframes (the Dashboard Blocks) which have the sandbox attributes:
allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-downloads
Given this, shouldn’t my modal button actually push the modal to the dashboard screen? or perhaps my code or understanding is incorrect.
My code for the body of the custom html block is below:
<div style="height: 100%; display: flex; flex-direction: column; justify-content: center;">
<button onclick="document.getElementById('id01').style.display='block';">Open Modal</button>
<div id="id01" class="w3-modal">
<div class="w3-modal-content">
<div class="w3-container">
<span onclick="document.getElementById('id01').style.display='none'" class="w3-button w3-display-topright">×</span>
<p>Some text. Some text. Some text.</p>
<p>Some text. Some text. Some text.</p>
</div>
</div>
</div>
</div>