Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6097

Keyboard shortcut for GUI main search input box

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Frontend (F)
    • None

      I think it will be useful add HTML accesskey for the main search input box.

      I am using searchbox extensively when I am working with Zabbix and using mouse again and again to set focus on the search input box is annoying.

      The modification in zabbix 5 is simple, I have simply added line "->setAttribute('accesskey', 's')" to the file app/partials/layout.htmlpage.aside.php.

      Whole code snippet now looks:

       

      $search = (new CForm('get', 'zabbix.php'))
              ->cleanItems()
              ->addClass(ZBX_STYLE_FORM_SEARCH)
              ->setAttribute('role', 'search')
              ->addItem([
                      (new CVar('action', 'search'))->removeId(),
                      (new CTextBox('search', getRequest('search', ''), false, 255))
                              ->addClass(ZBX_STYLE_SEARCH)
                              ->setAttribute('autocomplete', 'off')
                              ->setAttribute('aria-label', _('type here to search'))
                              ->setAttribute('accesskey', 's'),
                      $search_icon
              ]);
      
      

       

      Now it is possible to get focus on search pressing ALT+S (in chrome, details https://www.w3schools.com/tags/att_global_accesskey.asp)

       

      Please consider if this change is worth to add into standard zabbix source tree.

       

       

       

            vmurzins Valdis Murzins
            kbelunek Karel Bělunek
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: