Open thomaswilburn opened 4 years ago
Bug report from a station on the embedded version:
One other thing I just noticed though: The “Notify me about new posts” function doesn’t seem to work cross-browser. Safari gives me an option to allow notifications when I click that checkbox (which appeared checked when I started, btw – I don’t know if that’s it’s intended behavior or not but it made me think it was enabled by default). But FireFox throws an error: “The Notification permission may only be requested in a top-level document or same-origin iframe”. And Chrome doesn’t respond at all, not even with a console error, but I assume it’s also a security error. Silly Safari.
Ah, okay. We'll have to hide that for embeds, then.
Honestly, at this point I'm thinking we should lose the notifications by default, and consider them for further development at a later date. They're a neat idea, and I'm pretty sure we could make them work, but I don't really relish having a conversation with editors/reporters about "yes, it works on non-NPR machines, trust me," and station support seems like it could be a minefield.
Makes sense to me.
Notifications in an initial test were flaky, and this may have to do with setInterval throttling when the tab isn't active. Investigate any other possibilities, and investigate moving the update mechanism into a web worker to avoid getting throttled.