I'm a software engineer working as a full-stack developer using JavaScript, Node.js, and React. I write about my experiences in tech, tutorials, and share helpful hints.
I think the answer lies in the browser dev tools, I suggest the following steps to help debug.
Before and after clicking the button, inspect the modal element in the DOM. Does its content change and is it your page's content? If it is, check to see that the modal's open class is still present, as it could be a styling or JavaScript toggling issue.
If the content remains the same, check the network tab. Is a network request to /ajax/editorModal.php showing up on button click?
If /ajax/editorModal.php is showing up in the network tab, is the request successful? You can also click on that request to view the Preview or Response that is being returned to ensure it is correct.
You can also try to separate this code out into a codesandbox/jsfiddle to see if it can be reproduced under isolated conditions. If it can, it is the code written. If it works fine, other code in your app may be impacting it. You can also post the link here for others to do some testing of it.
Yes the network requests goes through, and the editorModal.php displays in the modal. The issue is, is that the modal won't even open half the time or it'll just close within 1-2 seconds.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think the answer lies in the browser dev tools, I suggest the following steps to help debug.
open
class is still present, as it could be a styling or JavaScript toggling issue./ajax/editorModal.php
showing up on button click?/ajax/editorModal.php
is showing up in the network tab, is the request successful? You can also click on that request to view the Preview or Response that is being returned to ensure it is correct.Yes the network requests goes through, and the editorModal.php displays in the modal. The issue is, is that the modal won't even open half the time or it'll just close within 1-2 seconds.