Re: [Xsltforms-support] IE9 Enter Key Bleed Through
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2013-03-27 17:55:39
|
Hello Paul, Thank you very much for contributing and improving XSLTForms! I have integrated this patch in the latest build: http://svn.code.sf.net/p/xsltforms/svn or https://github.com/AlainCouthures/xsltforms.git -Alain Le 14/03/2013 22:38, Paul Vanderveen a écrit : > > TerraXML has an XSLTForms 1.0RC based search form that has an > onkeydown event that uses the enter key to submit the search request > (see form image) > > When you press the enter key to perform the search in IE9, the website > would reload. > > Turns out the keypress event was getting handled by XSLTForms, but it > was propagating to other windows in the app. > > The following change to xsltforms.js seems to have fixed this > behavior. I have not identified any ill-effects from doing this so far. > > (xsltforms.js, line 5300) > > XsltForms_input.keyPressActivate = function(a) { > > this.keyPressCode = a.keyCode; > > /** Change put in by PV TerraXML to prevent ENTER key bleedthrough > on IE9 (See TV-238) */ > > if (a.keyCode === 13) { > > if (a.stopPropagation) { > > a.stopPropagation(); > > a.preventDefault(); > > } > > else { > > a.cancelBubble = true; > > } > > } > > /* END */ > > }; > > */Paul Vanderveen/* > > Chief Architect, Research and Development > > Description: TerraXML-Logo-BIG > > /1380 Forest Park Circle, Suite 100/ > > /Lafayette, CO 80026/ > > p: 888-707-7846 x 221 > > |