If the user has clicked on a result within a given tab to display the Quickview, and then changes the active filters within that same tab, the Quickview should be cleared. Otherwise, the UI might end up displaying a preview of a result that has been filtered out of the batch (a TIFF file when the filter is now set to only show JPEGs, etc).
Steps to Reproduce:
- Enter a search on the images tab and filter for a specific file type (TIFF for example)
- Click a result to show the quickview (make sure you are using the &quickview=true URL params)
- Change the filter to a different file type (say JPEG); now the previewed file no longer exists among the results in the grid
The quickview persists even though it is now "orphaned" and does not exist within the filtered results any longer. If you were to use keyboard navigation to trigger the close button, there would be an error since the UI is attempting to restore focus to an element that no longer exists on the page
Within a given tab, changing the filter settings should clear any visible Quickview element from the screen. However, this should not impact any other tabs (which may have their own, different, quickview items visible if the user goes back to them).