Javascript Issue – No Action on Right Click

Posted in: Newspaper
Post count: 4

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.
Post count: 4

Is there a ”hotlink protection” enabled on the Newspaper theme?

Post count: 22421

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!

Post count: 4

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>

Post count: 22421

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.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.