From: <bk...@up...> - 2005-03-11 22:07:26
|
HtmlUnit's implementation for onblur() through the methods WebClient.moveFocusFromElement and WebClient.moveFocusToElement ends up causing an infinite loop in certain cases. =20 =20 We have javascript on all our pages that set the focus to the correct input field upon page load. We also have input fields on our pages that post back to the server to obtain more info when the user enters a value and tabs out. These fields use the onblur() event to post back to the server and reload the page. =20 =20 Seems pretty straight forward....but here is the issue - HtmlUnit does not clear the elementWithFocus if an onblur causes a roundtrip to the server, so when our new page loads, it sets the focus on the correct input field, which in turn causes the method WebClient.moveFocusToElement to run, which does another onblur on the elementWithFocus which is the original field that did the original onblur from the previous page - so over and over again until the system crashes onblur is called on this field. I think the fix is for HtmlUnit to clear the elementWithFocus if javascript causes a post back to the server. Thoughts? =20 Thanks, =20 Brian =20 |