Hi,
I can’t use the ”right click” button to open a menu to perform actions such as ”View page source, ”View page info”, ”Open link in a new tab”, ”Open link in a new window”…
The problem is seen throughout the whole site (background and links): http://blog.wappiti.com
Thanks,
Virginie
-
This topic was modified 10 years by
vicha38.
Hello vicha38,
I have checked your site and i didn’t see any errors in your console. You can try to disable all your plugins except visual composer and see if the problem is plugin related. Also clear your cache and disable caching plugin as well. Id the problem is still there, you can try to activate a default WordPress theme like twenty fifteen to see if it’s theme related or WordPress related.
If the problem is still there let us know!
Thank you!
Hi,
My dev looked at the code and says that the problem comes from the script below. He said that when I right click, the script expects an element included in a form (select, input, textarea, password), if none of it is detected, nothing happens… Is there a way to take this script off?
Thanks
<script type=”text/javascript”>
/*<![CDATA[*/
document.oncontextmenu = function() {
return false;
};
document.onselectstart = function() {
if (event.srcElement.type != “text” && event.srcElement.type != “textarea” && event.srcElement.type != “password”) {
return false;
}
else {
return true;
}
};
if (window.sidebar) {
document.onmousedown = function(e) {
var obj = e.target;
if (obj.tagName.toUpperCase() == ‘SELECT’
|| obj.tagName.toUpperCase() == “INPUT”
|| obj.tagName.toUpperCase() == “TEXTAREA”
|| obj.tagName.toUpperCase() == “PASSWORD”) {
return true;
}
else {
return false;
}
};
}
document.ondragstart = function() {
return false;
};
/*]]>*/
</script>
Hello,
Unfortunately that script does not come from our theme. I double checked it!
Please try to activate a different theme and see if the problem is still there. You can also check the WordPress forum and you may find topics like: https://wordpress.org/support/topic/enable-right-click-on-my-theme.
Thank you.