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?
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?
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
Please login first to submit.