Forum Discussion
JoshSinfield
Nov 11, 2021Copper Contributor
Disable clicking on image web part
Is it possible to disable the lightbox when clicking on an image web part that doesn't have a link configured? It's confusing the navigation of the page. a simple switch of hyperlink on/off would...
itsfelipe
Jan 22, 2024Copper Contributor
So I found a solution / workaround...
Step 1: Install this solution
https://www.sharepointdiary.com/2020/09/sharepoint-online-inject-custom-css-to-modern-sites.html
Step 2: Add this line to your custom.css file
div[id*=vpc_CanvasImg] { pointer-events:none !important; }
Step 3: Enjoy your coffee
Step 1: Install this solution
https://www.sharepointdiary.com/2020/09/sharepoint-online-inject-custom-css-to-modern-sites.html
Step 2: Add this line to your custom.css file
div[id*=vpc_CanvasImg] { pointer-events:none !important; }
Step 3: Enjoy your coffee
Katie16
Apr 08, 2024Copper Contributor
itsfelipe many thanks for this solution - it worked a treat!
Just one query: could the custom css be modified somehow to allow links on images for the occasional situation where you do want them? Like when you want to link the image to a webpage or a larger version of itself. With this custom css implemented site-wide, it's no longer possible to add a hyperlink to an image at all. At least not on our tenancy. Any ideas?