internet explorer - jQuery IE 11 clicks buttons on Enter from keyboard -
i have order-page, working demandware. can search productnames, , list of those. click on product , add cart. appears in cart (on same page)
there's jquery function listening this:
jquery("button.removelineitem").click(function() { removelineitem(getbuttonval(jquery(this))); });
if press button, item removed list again. problem is, item being deleted if not click button click somewhere inside html page , hit enter. when input search focused, deletes items.
in firefox, works fine.
i tried determine keycodes , on, without success. tried use stuff "blur()" or focus other elements. gave every row on "onclick()" function still it's getting executed when hit enter.
i mean, click() executing connected event. read, last element of form automatically focused. not using form.
also, when deleted cart-items hitting enter; website tries execute other buttons.
all problems in ie 11. there known bug or ? prevent occuring ?!
acutally found solution on stackoverflow:
button click event fires when pressing enter key in different input (no forms)
just type type="button" , ie happy
Comments
Post a Comment