Opened 7 years ago

Closed 5 years ago

#9313 closed bug (duplicate)

Datepicker reappears after selection when datepicker is in a modal in IE

Reported by: andrewdmoreno Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.10.1
Keywords: regression Cc:
Blocked by: Blocking:

Description

When using a datepicker within a dialog, the datepicker reappears after selecting a date. If the datepicker is not in a dialog, this behavior is not reproduced.

I created a small jsbin to test and it looks like this behavior was first introduced in version 1.10.1 of jquery ui and remains through latest version. Versions prior (1.10.0, 1.9.x) did not replicate the behavior.

Failing jsbin (1.10.1):

http://jsbin.com/ajinuw/6/

Passing jsbin (1.10.0):

http://jsbin.com/ajinuw/5/

Change History (6)

comment:1 Changed 6 years ago by k_borchers

Status: newopen

I can confirm this issue and believe I have traced it back to https://github.com/jquery/jquery-ui/commit/c53198c2099d25e80887c86af6d0e624414cc2f7

Also, since then the ui-front change has been made but this is still an issue.

Last edited 6 years ago by k_borchers (previous) (diff)

comment:2 Changed 5 years ago by raisdead

I have the same problem. This works as a workaround. I don't know what adverse affects this has, so use at your own risk.

$.widget( "ui.dialog", $.ui.dialog, {
  _allowInteraction: function( event ) {
    return true;
  }
});

comment:3 Changed 5 years ago by tj.vantoll

Summary: IE8 Datepicker reappears after selection when datepicker is in a modalDatepicker reappears after selection when datepicker is in a modal in IE

This is still an issue in master: http://jsbin.com/ajinuw/8/. And it affects all versions of IE, not just IE8.

comment:4 Changed 5 years ago by tj.vantoll

Keywords: regression added

comment:5 Changed 5 years ago by tj.vantoll

I traced this down to this focusin handler in _createOverlay(): https://github.com/jquery/jquery-ui/blob/849c6fd5376e12c6093c557bd4836ef0b145f145/ui/dialog.js#L830-839

When you select a date from the popup IE triggers focusin, but other browsers do not. I'm not sure why.

comment:6 Changed 5 years ago by Scott González

Resolution: duplicate
Status: openclosed

Duplicate of #9125.

Note: See TracTickets for help on using tickets.