Page 1 of 1

Disable text/image selection in Facebook App

Posted: Wed Feb 10, 2010 4:00 am
by peterjwest
I'm making a drag and drop script and I'm trying to disable text/image selection because when the user drags the item it selects text and images underneath. However facebook's JS sandbox doesn't support this format:

Code: Select all

document.onselectstart = function() {return false} // ie
document.onmousedown = function() {return false} // mozilla
it only supports:

Code: Select all

document.addEventListener('onselectstart ', function() {return false})
which doesn't seem to work.
Does anyone know a workaround for this?

Re: Disable text/image selection in Facebook App

Posted: Sat Feb 13, 2010 4:38 pm
by kaszu
Instead of "onselectstart " first arguments should be "selectstart" without "on".