infinite lookup ajax calls if key enter on the page with layer lookup forms
---------------------------------------------------------------------------
Key: OFBIZ-4156
URL: https://issues.apache.org/jira/browse/OFBIZ-4156
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: SVN trunk
Environment: jQuery
Reporter: Leon
Fix For: SVN trunk
If the rendered page has one lookup field which is configured as layer mode, at
first open the lookup dialog and click the empty space of the page to hide it,
then, key the "enter", then in the console log you will find there's lookup
request logged. Try to key "enter" serveral times, you will get more lookup
requests in the backend. In particular case, even if you key one "enter" in, it
will send hundrends lookup calls. See attached "infinite-lookups.log" for the
log details.
Cause:
In modifySubmitButton of fieldlookup.js, it bind the keypress event to whole
"document" to call "lookupFormAjaxRequest" when "enter" keyin. And in
"lookupFormAjaxRequest" function, it call "modifySubmitButton" again after
data load.
Resolution:
Move the keypress event bind operation to dialog open process and unbind it
when dialog is closed.
See attached patch for code update.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.