Skip to main content

Search and Top Navigation

#15143 closed bug (duplicate)

Opened March 04, 2017 11:08PM UTC

Closed March 05, 2017 03:59PM UTC

Detached DOM tree entry

Reported by: tchatziarx Owned by: tchatziarx
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:
Description

Regarding some old bug reports like https://bugs.jqueryui.com/ticket/10629 and https://bugs.jqueryui.com/ticket/9555.

I was playing around with jquery-ui and I found this Detached DOM tree entry without using the datepicker from jquery-ui (which by the way does not appear if you call for example $("#foo").datepicker().

I also made a small change to the code in order to fix this and here it is in case you would want to include it in some newer version.

jquery-ui-1.12-1.js

on line 7305 I commented the following line

//~ this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );

and placed the same line a bit changed, as far as "this." concerns, after line 9241

/* Append datepicker main container to body if not exist. */
if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
	$.datepicker.dpDiv = datepicker_bindHover( $( "<div id='" + $.datepicker._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
	$( "body" ).append( $.datepicker.dpDiv );
}
Attachments (0)
Change History (3)

Changed March 04, 2017 11:38PM UTC by scottgonzalez comment:1

owner: → tchatziarx
status: newpending

I'm not sure what this ticket is for. Are you just trying to report that you've also encountered the previously reported bugs?

Changed March 05, 2017 02:35PM UTC by tchatziarx comment:2

status: pendingnew

Yes I am reporting that I've also encountered the previously reported bugs (just by including jquery-ui, without using any of its wigdets) and I also made the small change I mention in order to fix it.

Changed March 05, 2017 03:59PM UTC by scottgonzalez comment:3

resolution: → duplicate
status: newclosed

Duplicate of #9555.Ok, so I'll close this as a duplicate. The 1.1.3.0 release will include a complete rewrite of the datepicker widget, so this change won't apply to the new code.