'Dialog opens automatically on Iphone, Chrome
I have a dialog that is working fine (opening only on click) across all tested devices/browser aside from iphone XS, 15.3.1 software version, on Chrome, version 101.0.4951.58, in which the dialog opens straight away without any prompt or click, as soon as the whole page loads and I start scrolling down.
here is my code:
HTML
<dialog class="helper-modal" id="helper-modal">
<img id="close-modal" src="/images/icon_close.svg" alt="Close modal"/>
<div class="header">
<h3>Helper</h3>
<p>Lobortis elementum nibh tellus molestie nunc non blandit massa enim.</p>
</div>
</dialog>
JS
const helperModal = document.getElementById('helper-modal');
button.onclick = () =>{
helperModal.show();
}
any idea what might be causing this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
