Disabling right click on profile photo

How to Disabe right click on profile photo across the site?

Want this is only for comfort while using mobile.

Quote · 28 Sep 2017

How to implement this solution

https://stackoverflow.com/questions/28062979/disable-right-click-on-specific-div-or-class

Quote · 8 Apr 2018

Hello sureandhraindia!

 

It can be done via inserting the following code to the HEAD injection of admin panel->settings->basic settings area:

 

<script type="text/javascript" language="javascript">

$(document).ready( function() {

$('.sys-pct-image').bind('contextmenu', function(e) {

    return false;

}); 

});

</script>

 

With the best regards, Leonid

Quote · 8 Apr 2018

Thank you for the code. 

It seems browser overriding the script,  so it's not working. 

How the action  menu will come over browser menu. (currcurre  it's coming  under browser menu in mobile ) 

Quote · 9 Apr 2018

Hello sureandhraindia!


It seems browser overriding the script,  so it's not working. 


I tested it on our online demo (https://demo.boonex.com), you may repeat it there (in case if your site doesn't have serious modifications of core files).


How the action  menu will come over browser menu.


Sorry please provide more details, didn't get idea of your request.


With the best regards, Leonid


Quote · 13 Apr 2018

I tested it on our online demo (https://demo.boonex.com), you may repeat it there (in case if your site doesn't have serious modifications of core files).

 

I checked it on demo. It seems its working on profile page profile photo on the wall.

I am looking across the site, everywhere in timeline etc.

 

How the action  menu will come over browser

menu.

Please see image

IMG_20180413_202646.jpg · 209.1K · 19 views
Quote · 13 Apr 2018

The image shown was from android mobile nougat.

I touched and hold the profile photo, the actions menu was somewhere below the shown browser 'right click menu'

Quote · 13 Apr 2018

I have replaced the class


$('.sys-pct-image') with

 

$('.thumbnail_image')

 

Now, the browsers right click menu is not showing as required on profile photo in the entire site.

Is that right way?

Thanks for your code

 

Half half problems solved by disabling right click.

Now, how to avoid disappearance of action menu when clicked outside, or when touched (using mobile) outside the menu.

Also unable to get the action menu for the second time when touched the same thumbnail for second time

Quote · 14 Apr 2018