Ticket #4453 (closed bug: fixed)

Opened 6 years ago

Last modified 2 years ago

UI Datepicker inside UI Dialog Issue

Reported by: JBeckton Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

I noticed that when using the date picker on a form field inside a tabs container wrapped by a dialog I get a slightly different behavior then when using the date picker on a form in the page without the tabs and dialog.

It appears that the date picker is call on focus and when a date is selected and it populates the form field the field is then blurred so you can click on it again and change the date.

Inside the dialog it seems the field is not getting blurred when the date is set so in order to change the date after just setting it I have to click out of the field on the page somewhere to blur the field before I can activate the picker again on focus.

Change History

comment:1 Changed 5 years ago by joern.zaefferer

  • Milestone changed from TBD to 1.7.2

comment:2 Changed 5 years ago by joern.zaefferer

  • Milestone changed from 1.7.2 to 1.8

comment:3 Changed 5 years ago by btburnett3

Partially fixed by r3757

Described problem (input not blurring when a date is clicked) has been fixed. The problem was the overlay canceling the click event, so the input was never blurred by the click outside the input. Now that clicks inside the datepicker are not canceled, the problem is fixed.

However, during testing I noticed some other related problems. Clicks on the overlay have the same behavior, the datepicker closes but the field is not blurred. Additionally, clicks on the close button of the dialog do not close the datepicker at all.

comment:4 Changed 5 years ago by btburnett3

Fixed by r3759

Changed overlay to not stop propagation of events on the dialog overlay itself. They don't do anything anyway, and allowing them to propagate causes input to blur correctly.

Datepicker now tests to see if its in a dialog and binds to the dialog's close event so that it can hide the datepicker when the dialog is closed. It could have also been fixed by removing the .stopPropagation on the close buttons mousedown event, but I assume that the stopPropagation must have been in there for a reason since it's the only activity in the mousedown event.

comment:5 Changed 5 years ago by btburnett3

More work in r3762

No longer attaches to close event of dialog to detect dialog close. Instead, dialog change to not stop propagation of mouse down event on the close button.

comment:6 Changed 5 years ago by rdworth

  • Summary changed from UI Date Picker inside UI Dialog Issue to UI Datepicker inside UI Dialog Issue

comment:7 Changed 2 years ago by scott.gonzalez

  • Milestone changed from 1.9.0 to 1.11.0

comment:8 Changed 2 years ago by mikesherov

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from 1.11.0 to 1.8
Note: See TracTickets for help on using tickets.