Also fixes a bug where if the search was cleared, messages would after that appear all on top of each other. Also leaves the popup live after closing so the search can be gone back to
Fixes #2771