Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Safari doesn't like dragging locally linked images. So this fixes it.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored and cheeaun committed Jun 16, 2010
1 parent 237de46 commit d1ed4b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/MooEditable/MooEditable.js
Expand Up @@ -386,6 +386,14 @@ this.MooEditable = new Class({
if (Browser.Engine.webkit){
var el = e.target;
if (el.get('tag') == 'img'){

// safari doesnt like dragging locally linked images
if (this.options.baseURL){
if (el.getProperty('src').indexOf('http://') == -1){
el.setProperty('src', this.options.baseURL + el.getProperty('src'));
}
}

this.selection.selectNode(el);
this.checkStates();
}
Expand Down

1 comment on commit d1ed4b4

@ryanmitchell
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Thanks! More to follow soon - assuming I find the time.

Please sign in to comment.