jquery.AreYouSure icon indicating copy to clipboard operation
jquery.AreYouSure copied to clipboard

Does not trace inputs changed via JavaScript

Open DmitryEfimenko opened this issue 11 years ago • 4 comments
trafficstars

When an input's value is updated via JavaScript, event change does not catch that. Please consider adding event propertychange

DmitryEfimenko avatar Nov 26 '13 23:11 DmitryEfimenko

Yes. Someone raised that the other day. A temporary workaround is manually call the "change" event after making the change. e.g.

$("#myfield").trigger("change");

I'll add propertychange event on the next release. Do I need to think about cross-browser, or old-browser issues?

Thanks for the suggestion.

codedance avatar Nov 27 '13 00:11 codedance

Well, IE is always an issue. I know that this event works in IE9 and higher only. You may try to think about supporting IE8, but I would not even worry about that.

DmitryEfimenko avatar Nov 27 '13 00:11 DmitryEfimenko

This actually has bitten me now. I tried adding event propertychange in the line

$(fields).bind('change keyup propertychange', checkForm);

but that surprisingly didn't work. Any ideas on how I could "quick fix" this?

DmitryEfimenko avatar Dec 10 '13 01:12 DmitryEfimenko

I'll need to do some investigation. As mentioned, I think the best solution at the moment is to manually trigger the 'change' event after you make a modification in your JS code.

codedance avatar Dec 15 '13 23:12 codedance