This behaviour is really annoying, especially if you just want to edit some text on your concrete5 page. But how can you solve this problem?

The problem in your theme or template is, you have different versions of jQuery loaded. Concrete5 is using jQuery to handle all the modal and requests if you are editing your page. Most templates are using a newer version of jQuery and there is the real problem.

To fix this problem, go to your template and just add a condition to your custom jQuery implementation.

<?php $c = Page::getCurrentPage();
if (!$c->isEditMode()) { ?>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<?php } ?>

It's pretty easy to understand what the code do. Get the current loaded Page and check if it's in "EditMode" or not. This will prevent you loading two different versions of jQuery, while you are editing your page.

If you still have problems with your site, check your blocks especially if you are created a custom block by our own. Check the namespace if everything is correct.