24
Views
4
Comments
Images setting options in mobile view
Question

Hi All,

Is there any option when we upload the image from application in chrome/edge,we can hide below menu options on uploaded image.(Zoom in zoom out on click should happen but if we long press below options are coming-need to restrict long press and below options should not come,but on click on image zoom in zoom out should happen)

2024-09-09 08-44-46
BHUPENDRA SINGH

Hi ujwala,

You can call below javascript code at Screen's "OnRender" event. to prevent displaying browsers context menu.

var eleImgs = document.getElementsByTagName("img");

for (var i=0; i < eleImgs.length; i++)

{    

    eleImgs[i].setAttribute("oncontextmenu","return false;");

}

hope this will help.

UserImage.jpg
ujwala T

Yes,this is already done,but it doesn't work for long press event in mobile. 

2024-09-09 08-44-46
BHUPENDRA SINGH

hi,

Can you please check below link for disabling long press event on images:

https://copyprogramming.com/howto/javascript-chrome-disable-mobile-image-longpress-code-example#google_vignette

UserImage.jpg
ujwala T

Yes But it is not working,

done with settings link

https://www.askvg.com/tip-disable-visual-search-icon-on-image-hover-in-microsoft-edge/ 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.