-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Description
Steps to reproduce
- Get notification
- Don't click it!
- Get to the tab with element manually
- Expected: Notification disappears
- Actual: Notification happily stays up while you're trying a reply to message that initialy causes said notification
For the web app:
- Platform: web
- Browser: Version 87.0.4280.66 (Official Build) (64-bit)
- OS: Arch Linux + KDE
- URL: app.element.io
I suspected this being a problem by just using the app, but I pretty much guaranteed it when looking at the code:
Even though I'm not a web developer by trade right now, window.Notifications does seem to have a .close() method, we don't seem to call it:
- https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/Notifier.ts#L371 is supposed to close it, but
- https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/Notifier.ts#L126 is not executed, because
- https://github.com/vector-im/element-web/blob/develop/src/vector/platform/WebPlatform.ts#L75 didn't return it
- unlike electron: https://github.com/vector-im/element-web/blob/develop/src/vector/platform/ElectronPlatform.tsx#L370
PS: There is one possible last if that could mess with this, together with a note that not all browsers support .close(): https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/BasePlatform.ts#L166, mine isn't one of those