Fix tooltip occasionally not hiding when using a hide delay

Fixes #14375.
Closes #14519 by merging it.
grunt