[show-hint addon] Improve heuristic for keeping or closing the pop-up