That sounds more like a UX flaw in the app than something wrong with JS. Why would a newsreader close itself when you actually read the news? It makes more sense to open articles in a new tab (or whatever your specific device does), and leave the reader open, avoiding this problem. That is a fairly universal mechanism anymore when working from a page/app acting as a content hub.