Well, I found that return false
solves the problem more appropriately.
As long as e.preventDefault()
is called, text selection will be prevented too (probably some other actions), and it can not be undone.
I added return false
to mousedown
on images only
if(e.target.tagName.toLowerCase() == 'img') {
return false;
// e.preventDefault() also does the job
// but it prevents all default action
// and can not be undone
}
updated fiddle: http://jsfiddle.net/kVFTZ/4/