Keyboard focus on search tool

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Keyboard focus on search tool

Unread postby Ed Hawco » Wed Sep 05, 2018 8:44 pm

Hello. This is an odd one, brought to my attention by a heavy users of my documents. When you click the magnifying glass icon in the TOC area to bring up the search tool, you then have to manually click in the search field before typing your search term.

Request: is there a way to have the search field automatically have keyboard focus when the search tool is opened? For example, the way Google or DuckDuckGo search fields automatically have focus when those web pages are loaded.

Asking for a friend. ;-)
e
d
============================================
Ed Hawco
User avatar
Ed Hawco
 
Posts: 139
Joined: Thu Nov 07, 2013 5:50 pm
Location: Montreal

Re: Keyboard focus on search tool

Unread postby Tim Frost » Wed Sep 05, 2018 9:30 pm

Seconded. This has always annoyed me, but never quite enough to ask for it to be fixed.
Tim Frost
 
Posts: 228
Joined: Mon Nov 22, 2004 11:45 pm

Re: Keyboard focus on search tool

Unread postby Simon_Dismore » Wed Sep 05, 2018 11:45 pm

There's probably a cleaner method but but you can hack a quick fix like this:
  • Find an instance of zoom_search.js, e.g. in your existing WebHelp output folder
  • Copy the file somewhere it won't be overwritten
  • Open it in a code editor and locate function ZoomShowSearchBox()
  • Put the editing caret after a space in document.writeln("...") so that a new attribute can be added
  • Insert autofocus=\"autofocus\"
  • Save the updated version
  • Each time you recompile your WebHelp, copy the updated version into the output folder, overwriting the compiler-generated version
Simon_Dismore
 
Posts: 49
Joined: Thu Jul 13, 2017 2:57 pm

Re: Keyboard focus on search tool

Unread postby Tim Green » Thu Sep 06, 2018 8:52 am

Interesting, that is not something I've ever even noticed. I think I've been using computers for so long that clicks like that are second nature and I don't even think about them. 8)

I'm going to update this in the custom versions of zoom_search.js in the Premium Pack skins in the next update but I can't promise whether this will happen for the standard version of the file used in the standard skins or default templates without skins. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 20158
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Keyboard focus on search tool

Unread postby Ed Hawco » Thu Sep 06, 2018 3:39 pm

Thanks Tim! Appreciated!
e
d
============================================
Ed Hawco
User avatar
Ed Hawco
 
Posts: 139
Joined: Thu Nov 07, 2013 5:50 pm
Location: Montreal


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron