Bug 16646 - No way to prevent dragging of Images from SVGs
Summary: No way to prevent dragging of Images from SVGs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://people.mozilla.com/~vladimir/d...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-28 13:05 PST by Eric Seidel (no email)
Modified: 2012-05-19 17:04 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-12-28 13:05:52 PST
No way to prevent dragging of Images from SVGs

http://people.mozilla.com/~vladimir/demos/photos.svg
We allow the user to drag images from photos.svg, which is not what the author intended.  The author makes no attempt to prevent us from doing so, but we don't offer him a way to do so even if he wanted to.

In HTML you prevent image drag using:
ondragstart="return false;" (borrowed from IE)
This doesn't actually work in FireFox however.

And in SVG we don't sign up for any ondragstart listener.

Maybe there is some other way to prevent image drags that I'm missing here?  I don't think copying the ondragstart IE behavior into SVG makes much sense.
Comment 1 Eric Seidel (no email) 2007-12-28 13:10:03 PST
This all comes about because Firefox doesn't support dragging images from SVG to start with.  (That's their bug.)
Comment 2 Eric Seidel (no email) 2007-12-29 16:11:12 PST
Hum... it seems onmousedown="return false;" prevents drags in both Safari and Firefox.  SVG content included.
Comment 3 Nikolas Zimmermann 2012-05-19 17:04:18 PDT
This problem is gone in trunk since a while. Images in SVGs can no longer be dragged by default.