For logged-out users, Commons uses a script called [[ https://commons.wikimedia.org/wiki/MediaWiki:AnonymousI18N.js | AnonymousI18N.js ]] instead of the Universal Language Selector to provide language-switching functionality (logged-in users get ULS).
When this script is active, it breaks the QuickView functionality on our experimental Special:MediaSearch page by injecting its own behavior (which is to navigate the user to the target page with the appropriate language params added to the URL):
```
// Prevent the default linking functionalty and instead use getUrlForLanguage()
e.preventDefault();
location.href = AnonymousI18N.getUrlForLanguage(href_full, wgAnonUserLanguage);
```
We want links in the MediaSearch results grid to have a different behavior. Rather than immediately taking the user to a new page, we want them to open a "quickview" sidebar which shows a preview of the given media file in-place. But we still want to use link elements here so that the user can control-click to open a result in a new tab, etc.
Since this is an on-wiki script, I've added a proposal on the relevant talk page to add support for disabling on specific pages (maybe through a JS config var or similar): https://commons.wikimedia.org/wiki/MediaWiki_talk:AnonymousI18N.js#Allow_specific_pages_to_disable_this_script
**Steps to Reproduce: **
Perform a media search in a non-English language as an anonymous user, for example:
https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&quickview=true&q=cat&debug=true&uselang=de
Make sure to let the page JS fully load; this can take extra time with debug mode on, and click an image result.
**Actual Results:**
The user is taken directly to the File page of the clicked result.
**Expected Results:**
The QuickView element should appear on the right-hand side of the same page. Compare with what happens when you search in the default language:
https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&quickview=true&q=cat&debug=true