Skip to main content

Search and Top Navigation

#14937 closed bug (duplicate)

Opened March 17, 2016 01:45PM UTC

Closed March 17, 2016 11:38PM UTC

Jquery UI dialog vs datepicker

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

Hi.

I have the following code http://pastebin.com/raw/CZd3FsPm.

We are opening ui dialog with one input in it and attaching a datepicker.

It works like charm except in IE11 where it doesn't close on date selection. When a user clicks any date the datepicker hides itself and then immediately restores.

I've found the problem in these lines of code of jquery ui:

		if ( !this.document.data( "ui-dialog-overlays" ) ) {

			// Prevent use of anchors and inputs
			// Using _on() for an event handler shared across many instances is
			// safe because the dialogs stack and must be closed in reverse order
			this._on( this.document, {
				focusin: function( event ) {
					if ( isOpening ) {
						return;
					}

					if ( !this._allowInteraction( event ) ) {
						event.preventDefault();
						this._trackingInstances()[ 0 ]._focusTabbable();
					}
				}
			});
		}

_focusTabbable focuses back on input and datepicker reopens.

Attachments (0)
Change History (2)

Changed March 17, 2016 03:12PM UTC by rjollos comment:1

description: Hi. \ I have the following code http://pastebin.com/raw/CZd3FsPm. \ We are opening ui dialog with one input in it and attaching a datepicker. \ It works like charm except in IE11 where it doesn't close on date selection. When a user clicks any date the datepicker hides itself and then immediately restores. \ I've found the problem in these lines of code of jquery ui: \ \ if ( !this.document.data( "ui-dialog-overlays" ) ) { \ \ // Prevent use of anchors and inputs \ // Using _on() for an event handler shared across many instances is \ // safe because the dialogs stack and must be closed in reverse order \ this._on( this.document, { \ focusin: function( event ) { \ if ( isOpening ) { \ return; \ } \ \ if ( !this._allowInteraction( event ) ) { \ event.preventDefault(); \ this._trackingInstances()[ 0 ]._focusTabbable(); \ } \ } \ }); \ } \ \ _focusTabbable focuses back on input and datepicker reopens.Hi. \ I have the following code http://pastebin.com/raw/CZd3FsPm. \ We are opening ui dialog with one input in it and attaching a datepicker. \ It works like charm except in IE11 where it doesn't close on date selection. When a user clicks any date the datepicker hides itself and then immediately restores. \ I've found the problem in these lines of code of jquery ui: \ \ {{{#!javascript \ if ( !this.document.data( "ui-dialog-overlays" ) ) { \ \ // Prevent use of anchors and inputs \ // Using _on() for an event handler shared across many instances is \ // safe because the dialogs stack and must be closed in reverse order \ this._on( this.document, { \ focusin: function( event ) { \ if ( isOpening ) { \ return; \ } \ \ if ( !this._allowInteraction( event ) ) { \ event.preventDefault(); \ this._trackingInstances()[ 0 ]._focusTabbable(); \ } \ } \ }); \ } \ }}} \ \ `_focusTabbable` focuses back on input and datepicker reopens.

Changed March 17, 2016 11:38PM UTC by scottgonzalez comment:2

resolution: → duplicate
status: newclosed

Duplicate of #9125.