TagTextBox add onFocusOut event

0
1

In TagTextBox if I type in text area without pressing separator char, text is lost (not converted to tag) when TagTextBox loses focus.

onFocusOut event in javascript should be the right way to handle it: wich is the best way to add it to my control?

I’ve used Javascript extender on my control to add this method:

this.addListener("focusout", function(e) {
    var text = this.__getFieldText();
    if (text) {
        this.__addTag(this.__getFieldText());
        this.__setFieldText("");
        e.stop();
    }
});

Code to handle tag copied from wisej-js/wisej.web.TextBox.TagTextBox.js at master · iceteagroup/wisej-js · GitHub

Methods __addTag and __setFieldText are defined in wisej.we.TextBox.TagTextBox.js

Is there a better way to do it?

 

 

  • You must to post comments
0
0

Thank you very much.

Another question: i would like to add a custom autocomplete using an UserPopUp. TagTextBox don’t sent KeyPress (or TextChanged) when you type into input textbox. (key press is handled in TagTextBox but not forwarded).

How can i implement that?

 

  • You must to post comments
0
0

Hi Jonatha,

you can add use the ClientEvents property collection.
Just add an event handle for focusout and use the script you have put into the listener.

See simple sample, seems to work fine.

Best regards
Frank

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.