Bug #13366

A single value autocomplete field creates a new iframe whenever it loses focus

Added by David Juhasz about 1 month ago. Updated 8 days ago.

Status:QA/ReviewStart date:06/23/2020
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:AJAX
Target version:Release 2.6.2
Google Code Legacy ID: Tested version:2.6
Sponsored:No Requires documentation:

Description

Problem

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
  1. 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)
  2. Open the Firefox "Inspector" pane by pressing F12, then clicking on the "Inspector" tab in the debug frame
  3. Create or edit an Archival description
  4. 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
  5. 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
  6. Repeat

Expected behaviour
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.

History

#1 Updated by David Juhasz about 1 month ago

  • Subject changed from Single value autocomplete fields create too many iframes to A single value autocomplete field create a new iframe whenever it loses focus

#2 Updated by David Juhasz about 1 month ago

  • Subject changed from A single value autocomplete field create a new iframe whenever it loses focus to A single value autocomplete field creates a new iframe whenever it loses focus

#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.

#4 Updated by David Juhasz about 1 month ago

  • Target version set to Release 2.7.0

#5 Updated by David Juhasz about 1 month ago

  • Description updated (diff)

#6 Updated by Dan Gillean 26 days ago

  • Target version changed from Release 2.7.0 to Release 2.6.2

#7 Updated by David Juhasz 19 days ago

  • Assignee deleted (David Juhasz)

#8 Updated by Mike Cantelon 8 days ago

  • Status changed from Code Review to QA/Review

This was merged. Setting to QA although I don't know if it needs QA.

Also available in: Atom PDF