jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

Datepicker: programmatically destroy don't work anymore

Open differens opened this issue 2 years ago • 3 comments

After upgrading from version 1.12.1 to 1.13.2 the method datepicker( "destroy" ) do not close and destroy the calendar ui.

I have prepared an example at the link below.

https://jsfiddle.net/7kdwvgp8/

After starting the execution just open the calendar and wait for the timeout which calls the destroy after 5 seconds. The result is that the calendar remains open and each iteration leads to an error

es--anomalie

Problem not occurs in 1.12.1.

Thank you in advance.

differens avatar Jul 24 '23 08:07 differens

I'm working on this

porterclev avatar Jun 21 '24 22:06 porterclev

I will be helping to contribute to this.

JasonKimy avatar Jun 22 '24 20:06 JasonKimy

I will be working on this issue!

tchan102 avatar Jun 24 '24 17:06 tchan102

@fnagel When comparing the two versions, we found that on version 1.12.1, the widget will only hide after being destroyed once the user clicks on another part of their screen. Would you prefer to have the widget disappear when destroyed or only hide the date picker once the user clicks away?

1.12.1 Functionality Sequence 01_9

Proposed Fix Sequence 01_5

porterclev avatar Jul 08 '24 18:07 porterclev

Note that the description here is not fully correct - in 1.12.1, the datepicker UI was not hidden on destroy either! It was just hidden after the first mousedown. If you just hovered over the datepicker or clicked on any of its elements, you'd get lots of console errors even in 1.12.1.

But yes, the 1.13.2-1.13.3 behavior is worse since there's no way to get rid of the widget from the user perspective, irrespective of the underlying errors.

More info at https://github.com/jquery/jquery-ui/pull/2268#issuecomment-2262670431.

mgol avatar Aug 01 '24 10:08 mgol