[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1221
  • Last Modified:

Disable Drag & Drop for images on Safari (Javascript)

Hi,
I have tried to stop highligting on the homepage, and it works fine, but not on photos in Safari.
I use this code:

<body onselectstart="return false" onload="document.body.style.MozUserSelect='none'">

Thanks
0
Kasketten
Asked:
Kasketten
1 Solution
 
David H.H.LeeCommented:
Hi Kasketten,
Try onDragStart() event.
eg:
<body onDragStart="return false" onselectstart="return false" onload="document.body.style.MozUserSelect='none'">
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now