jQWidgets Forums
jQuery UI Widgets › Forums › Editors › Input, Password Input, TextArea, ColorPicker, Rating, TagCloud, Loader › input change event not fired until user clicks on other element
Tagged: html input
This topic contains 6 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 9 months ago.
-
Author
-
In internet explorer, when a user enters a value in an input field, the change event is not triggered until another page element is clicked. This is demonstrable on the input control change event page http://jsfiddle.net/jqwidgets/Nbmbx/
or just go to the input control bind event try it page. Type xxx in the input field and return. You will see that the
“Bind to the change event” does not come up until you click on another element in the page.As a workaround, hitting TAB instead of enter seems to work – but this is not a fix.
Hi aserlanger,
The “change” event as a standard JavaScript Event is raised by the web browser, not by jQWidgets. The “change” event is usually raised on Blur and when the value is changed while the Input was on focus.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/This may well be. However, In this case, the change event is not being fired as is proved by the non-functioning of your demo.
Hi aserlanger,
The “change” event as far as I see in our demo is raised on blur which is correct. If you want to read more about “change” event, look at what Mozilla writes about it: https://developer.mozilla.org/en-US/docs/Web/Events/change. If you need some different behavior, then you will have to use another event like keydown, keyup or something else.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/The change event itelf is not the issue. The issue is that IE does not fire it like other browsers as you would see if you test your demo under IE. Tab works, enter/return does not. The fix I found is to, under IE, monitor the keystrokes sent to the input field and when enter (13) is detected, trigger the change event yourself.
Hi aserlanger,
Web browsers work in a different way and that is since web browsers exist. You can write to the people which write the Internet Explorer web browser about your compain about how the “change” event is expected to work for INPUT tags. The “change” event in the HTML Input/jqxInput as I wrote several times is raised by the web browser, not by jQWidgets.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.