Relative Content

Tag Archive for javascriptasp.net

Event listeners are removed from TextBox when it loses focus

I’m working with event listeners on an asp.net TextBox and they do work fine until it loses focus. Once it does that it seems that event listeners are removed and they don’t fire at all as noted by the absence of logging in the console. My code should mask input text after 3rd character and ensure the cursor is positioned always at the end of text. Is there any way to reattach the listeners?