When an admin user is logged in, to the front-end of a Joomla 3 site, when he moves the mouse over modules or menus, an Edit Module icon / message appears inside a box. Clicking on it, will take the user to the backend. How to prevent this?
There are 2 options to prevent this:
One is a global setting to stop this from happening.
In Global Configuration -> Site Settings -> Mouse-over edit icons for:
We can set this setting to Modules & Menus, Modules, or None.
The other option is related with the Module Permissions. Since in Joomla 3, we have the ability to set permissions by module, we can take away the ability to edit specific modules by specific usergroups. When a user won't have edit permissions on a module, the Edit icon will not appear in front-end. However, this will restrict the users of this usergroup from editing the module in the backend as well.
I was searched for a solution for the same issue you had when I found your question. The solution I took was a template overwrite, which removed the edit button for me. You need to change the com_content/article/default.php file and change the line:
$canEdit = $params->get('access-edit');
$canEdit = false;
A more detailed explanation can be found in the source here. This solved the issue for me.