Flyer53 / jsPanel4

A JavaScript library to create highly configurable floating panels, modals, tooltips, hints/notifiers/alerts or contextmenus for use in backend solutions and other web applications.
https://jspanel.de/
Other
317 stars 57 forks source link

panel.close() crashes if called twice #178

Closed TerrapinSoftware closed 2 years ago

TerrapinSoftware commented 2 years ago

Describe the bug panel.close() on a closed panel throws an error.

To Reproduce call panel.close() twice

Suggested Fix

At the beginning of close(), add something like

if (!self.parentElement) return;
Flyer53 commented 2 years ago

@TerrapinSoftware Thanks for the hint. I'll take a look at that the next days.

Flyer53 commented 2 years ago

I just released v4.14.0 which includes the change you proposed.