javascript - ASP.NET - onkeydown event not working in Firefox -
so having issue in firefox onkeydown event image button. don't want button action fire until let off button. works great in both ie , chrome. cannot figure out why doesn't work in firefox(20.0.1). here image button code:
<asp:imagebutton id="btnbutton1" imageurl="/images/target.png" runat="server" height="75" width="75" onkeydown="return false;" onkeyup="buttonclick()" />
so onkeyup seems work perfect in browsers, onkeydown not want work in firefox , cannot figure out. appreciated.
i don't know if help, post javascript function onkeyup well:
function buttonclick() { document.getelementbyid('<%=btnbutton1.clientid %>').click(); return true; }
hmmm, can try?
$(document).on("keypress", ".chat-input ", function (val) { cleartimeout(timer); timer = settimeout(function () { //codes }, 1); }).on('keydown', function (e) { if (e.keycode == 8 || e.keycode == 13) { $('.chat-input').trigger('keypress'); } });
Comments
Post a Comment