Dev's 'Smart' Notification Fix Silently Broke Alerts for Multi-Monitor Users
A developer building ShelfTalk, a real-time social app for book lovers, added a feature to suppress push notifications when users were actively viewing the app tab. The logic relied on the Page Visibility API's document.hidden property, which only returns true when a tab is minimized or fully hidden behind other windows. Users on multi-monitor setups began missing direct messages and group mentions because their ShelfTalk tab remained technically 'visible' on a second screen, even while they worked on a different app on their primary monitor. The developer discovered the flaw only after a user described their dual-screen workflow, revealing that the OS considers any on-screen window as visible regardless of user attention. The bug highlights a key limitation of the Page Visibility API: it tracks window visibility, not actual user focus or attention.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in