Earlier, the tooltip was continuosly shown even though search field had text.
Hover over search field
Agreed. There's no need to see the keyboard shortcut to focus the search field after the user has already focused it and is currently using it.
However this is currently very broken: the tooltip always disappears after like a quarter of a second now. That won't fly. Please test for behavior as well as code before publishing a patch. I'm not sure you even need to add the timeout: line at all.