Also see LPP-4170 - Edittext does not allow mouse to highlight entered text in dhtml.

Henry, here's how I found these:
$ svn blame LzInputTextSprite.js | grep onselectstart
  6826        max     document.onselectstart = null;
13912 pbr document.onselectstart = LzTextSprite.prototype.__cancelhandler; 7295 max document.onselectstart = LzTextSprite.prototype.__cancelhandler;

Of course that only shows the most recent change for those lines - I searched my checkin history and it looks like the original change was from r1035(!):
Turn off text selection in OE[sic] DHTML - fixes dragging in LzPix

[email protected] wrote:
 This dates back to LPP-4715.



On Tue, Jun 2, 2009 at 9:57 AM , Henry Minsky wrote:

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
[email protected]_ <mailto:[email protected]>



--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to