[ https://issues.apache.org/jira/browse/OFBIZ-4156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-4156. ---------------------------------- Resolution: Fixed Assignee: Jacques Le Roux Thanks Leon, Your (slightly modified) patch is in trunk at r1065056 I just ketp javascript:set_ in the indexOf( instead of simply javascript: Good catch on "the first Entry of the row" > 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 > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: fieldlookup.patch, infinite-lookups.log > > > 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.