Ticket #76 (new enhancement)

Opened 2 years ago

Last modified 1 year ago

A method to handle selection of text in a text box or area.

Reported by: worik@noggon.com Assigned to: somebody
Priority: low Milestone: MochiKit 1.5
Component: component1 Version:
Severity: minor Keywords:
Cc:

Description

I guess this is in the DOM model. I am a mochikit user not developer so I have not ooked at the code but I end up using.... function selectRange(tb, iStart, iLength){

if (tb.createTextRange) {

var oRange = tb.createTextRange(); oRange.moveStart("character", iStart); oRange.moveEnd("character", iLength - tb.value.length); oRange.select();

} else if (tb.setSelectionRange) {

tb.setSelectionRange(iStart, iLength);

}

}

It would be nice to say (where tb is INPUT({"type":"text"....

tb.select(s, f)

Worik

Change History

05/14/07 18:52:45 changed by rsayre@mozilla.com

  • milestone set to MochiKit 1.5.

moving to 1.5 for now