minor fix of pop-up window behavior

Dismiss any open pop-up when another txt file is opened