Issue #3564229 by dydave: Admin Toolbar Search: Refactored JS code with...
https://www.drupal.org/project/admin_toolbar/issues/3564229
Admin Toolbar Search: Refactored JS code with Vanilla JS and fixed ESLINT issues:
- Fixed all
ESLINTvalidation errors. - Replaced JQuery (
$) calls where possible: The only real dependency/call remaining is to init the JQueryautocomplete. - Fixed #3552640 by stripping off the query string from searched labels, see function
handleAutocomplete. - Simplified
_renderItemtemplate by removing unneededspantag with the link URL, see also change to CSS. - Adjusted Tests class
AdminToolbarToolsSearchTestto the change of the_renderItem, without aspanbut anawithhrefinstead. - Replaced JS logic with the search autocomplete list of suggestions setting the
z-index, with a simple CSS rule. - Added
jsdoccomments where needed, for functions, params, etc... -
FunctionalJavascripttests: Updated the keyboard class test to be a bit more generic and provide test cases for different events:
Keyboard ('alt + a') and Click.