[Laszlo-dev] What was the reason for setting document.onselectstart in LzInputTextSprite?

Henry Minsky hminsky at laszlosystems.com
Tue Jun 2 06:57:44 PDT 2009


There's some code in the kernel DHTML LzInputTextSprite which globally
disables the onselectstart

// prevent text selection in IE
// can't use lz.embed.attachEventHandler because we need to cancel events
    document.onselectstart = LzTextSprite.prototype.__cancelhandler;
    document.ondrag =  LzTextSprite.prototype.__cancelhandler;

What was the need for that? Why wasn't it sufficient to rely on the
LzTextSprite.setSelectable behavior
(which sets         this.__LZdiv.onselectstart =
LzTextSprite.prototype.__cancelhandler )? Or was this
to fix some other issue besides toggling (input) text selectability?



-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090602/54a75e12/attachment.html


More information about the Laszlo-dev mailing list