You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your issue may already be reported!
Please search on the issue track before creating one.
Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
Are you running the latest version?
Are you reporting to the correct repository?
Bug Report
Environment
Bulma Calendar version: [e.g. v6.1.18]
OS: [Windows 11, Garuda Linux x86_64 kernel 6.1.8-zen1-1-zen]
Browser: [all]
How you are customizing the extension: [no]
Current Behavior
When destroying calendar component, an error
"TypeError: this._ui is null" is thrown in the document onclick event handler "onDocumentClickDateTimePicker".
The issue is present in versions above 6.1.0, but switching to version 6.1.0 solves the problem.
Possible Solution
I guess that I can debug and fix this problem and I'm happy to do it, but first please please confirm that this is indeed the problem and not me doing something wrong :)
Additional context/Screenshots
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
You are welcome to look at it, but simply copying the old 6.1.0 passage will not do the trick.
The problem is that the original DOM element is modified by the calendar and would have to be restored to its old state in a destroy(). Previously the "destroyed" element was left in an undefined state, now it is deleted from the DOM on a destroy(). Therefore, a new attach() does not work, because the element no longer exists.
What's wrong with showing and hiding the element with a simple show() / hide()? These functions are made for that.
dmoebius
added a commit
to meta-system-GmbH/bulma-calendar
that referenced
this issue
Aug 17, 2023
…k#315)
The fix removes the global onDocumentClickDateTimePicker event handler on destroy.
Plus: the destroy() method has been made public in the typescript definition.
Your issue may already be reported!
Please search on the issue track before creating one.
Bug Report
Environment
Current Behavior
When destroying calendar component, an error
"TypeError: this._ui is null" is thrown in the document onclick event handler "onDocumentClickDateTimePicker".
The issue is present in versions above 6.1.0, but switching to version 6.1.0 solves the problem.
Possible Solution
I guess that I can debug and fix this problem and I'm happy to do it, but first please please confirm that this is indeed the problem and not me doing something wrong :)
Additional context/Screenshots
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Codesandbox with example
You can change bulma-calendar version to 6.1.0 in package.json and the problem disappears
The text was updated successfully, but these errors were encountered: