Problem/Motivation

Recently upgraded to core 10.6.2 (+ admin_toolbar 3.6.3) and a second search input has appeared on the admin toolbar.

double inputs

It appears to only be an issue when using the Gin theme, shifting admin theme to Claro, there is only one input.

Additionally the "Search" menu item throws a JS error on click:

Uncaught TypeError: Cannot read properties of null (reading 'focus') at HTMLSpanElement. (admin_toolbar_search.js)

Around this:
searchTabTray.querySelector(searchInputID).focus();

I suspect because there are duplicated IDs on the input fields that are conflicting.

If we enable the option "Display the search input as a menu item." , both input fields disappear but the aforementioned button does nothing on click, no errors logged to console.

Steps to reproduce

Enable admin_toolbar_search (submodule) with Gin set as admin theme.

Proposed resolution

Noticed a mention in the 3.6.3 release notes:

Any code refactoring was backed with automated tests, trying to improve the coverage, as much as possible, but they have their limits, in particular: there is currently nothing in place for visual regressions.
Therefore, if you experience any visual or display issues with any of the components of the module, we would greatly appreciate your feedback and testing report in module's issue queue.

So I just wanted to bring this to attention. Not 100% sure on the causes or best path for resolution at this stage.

Comments

chroid created an issue. See original summary.

dydave’s picture

Thanks a lot for the detailed description of the issue, with a screenshot, and versions, it's greatly appreciated! 🙏

Indeed, we are aware of the issues currently with the compatibility of the module with the most recent versions of the Gin Theme, see:
#3557278: Gin theme: Improve compatibility support

I should be able to look into this problem this coming weekend and will hopefully come up with an initial patch to be tested.

In the meantime, please let us know if you spot anything else or would have any questions on the most recent changes to the module, we would surely try answering as soon as possible.
Thanks in advance!

chroid’s picture

Superb! Thanks @dydave, will eagerly await some updates.

Here for testing anything that might come through!

jhan1112’s picture

StatusFileSize
new869 bytes

A quick css fix while waiting for https://www.drupal.org/project/admin_toolbar/issues/3557278 to be resolved.

jhan1112’s picture

StatusFileSize
new491 bytes

A quick css fix while waiting for https://www.drupal.org/project/admin_toolbar/issues/3557278 to be resolved.