A single value autocomplete field creates a new iframe whenever it loses focus
|Target version:||Release 2.6.2|
|Google Code Legacy ID:||Tested version:||2.6|
The changes to autocomplete.js in commit 8f89e0b0 fixed issue #13349, but now whenever a single value autocomplete field (e.g. Archival Description > Repository field) loses focus a new, unnecessary iframe is added to the HTML page invisibly. The extra iframes doesn't cause the site functionality to break, but may become a performance issue if a lot of iframes are added to the page.Steps to reproduce
- With Firefox, login as a user with permissions to create a new Archival Description (this will work in Chrome too, but the DOM inspector is slightly different)
- Open the Firefox "Inspector" pane by pressing F12, then clicking on the "Inspector" tab in the debug frame
- Create or edit an Archival description
- In the repository field enter a new repository name that is not already in the system, then tab or click out of the field. A new <iframe> will be added after the closing </body> tag on the page
- Click on the repository field again, and edit the name. When you tab or click out of the Repository field another <iframe> will be added after the previous one
The autocomplete should only create an iframe if necessary to add a new related resource, e.g. to add a new Repository and link it to the current Archival Description.
#3 Updated by David Juhasz about 1 month ago
- Status changed from New to Code Review
I have a fix for this on dev branch https://github.com/artefactual/atom/tree/dev/issue-13366-reuse-autocomplete-iframes. I'll submit a PR for this commit against the qa/2.7.x branch after it is created.