Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: curious about turning save image off
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: curious about turning save image off



Hi David,

On Sep 19, 2008, at 19:18 , whit wrote:

I'm working on a web app that requires dragging around some images and
have been plagued by the continued reappearance of the "save image"
feature at inappropriate times.  Is there a way to selectively disable
this feature for a particular image or dom node?


One way to turn this off is to capture the event and prevent the default UI behavior. For instance, you can register a touchstart event listener and call event.preventDefault() on the event. For instance:

my_image.addEventListener('touchstart', prevent_default, false);

function prevent_default (event) {
 event.preventDefault();
}

I know this is not always an ideal solution as it requires script, but in your drag-and-drop use case, it should fit right in your code.

Antoine
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Safari-iPhone-Web-Dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >curious about turning save image off (From: whit <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.