jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
689 stars 59 forks source link

x-notification - Uncaught (in promise) DOMException #94

Closed DeezjaVu closed 5 years ago

DeezjaVu commented 5 years ago

Ran into this error message when doing the following:

dialog element that contains an x-notification, among other things, is added to the document body.

<dialog>
    <header><x-label>Header</x-label></header>
    <main>
        ...other elements
        <x-notification timeout="5000"><x-label>some message here</x-label<</x-notification>
    </main>
</dialog>

When the dialog is closed and removed from the document body while the notification is still animating (because of the 5 sec timeout), the next time I mouse click anywhere in the application, this error message shows up:

xel-notification-error

So after the dialog is removed, there's probably still a mouse event handler trying to reference the notification: window.addEventListener._windowPointerDownListener.

All in all it's not that big of a deal, as in my case the notification shouldn't be animating (closing) when I remove the dialog it is in. But thought I'd mention it anyway.