Skip to main content

Search and Top Navigation

#15276 new bug ()

Opened March 05, 2018 02:07PM UTC

Last modified March 05, 2018 02:18PM UTC

Datepicker does not hide when show is cancelled on another field

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

**Scenario: **

Three form fields, of which the second and third have a datepicker attached.

The datepicker has a beforeShow function that returns false for the second datepicker, but an empty options object ({}) for the first.

When the user tabs quickly from the first field to the third, I expect the datepicker to not be visible. The actual result is that the datepicker is visible under the second field. This occurs because the beforeShow function for the third field is called while the show animation for the second is still in progress, and it calls stop on the datepicker container element.

Codepen: https://codepen.io/pmahony893/pen/GQawVO

Attachments (0)
Change History (1)

Changed March 05, 2018 02:18PM UTC by pmahony893 comment:1

description: **Scenario: ** \ \ Three form fields, of which the second and third have a datepicker attached. \ \ The datepicker has a `beforeShow` function that returns `false` for the second datepicker, but an empty options object (`{}`) for the first. \ \ When the user tabs quickly from the first field to the third, I expect the datepicker to not be visible. The actual result is that the datepicker is visible under the second field. This occurs because the `beforeShow` function is called while the hide animation is still in progress, and it calls `stop` on the datepicker container element. \ \ Codepen: [https://codepen.io/pmahony893/pen/GQawVO] \ **Scenario: ** \ \ Three form fields, of which the second and third have a datepicker attached. \ \ The datepicker has a `beforeShow` function that returns `false` for the second datepicker, but an empty options object (`{}`) for the first. \ \ When the user tabs quickly from the first field to the third, I expect the datepicker to not be visible. The actual result is that the datepicker is visible under the second field. This occurs because the `beforeShow` function for the third field is called while the show animation for the second is still in progress, and it calls `stop` on the datepicker container element. \ \ Codepen: [https://codepen.io/pmahony893/pen/GQawVO] \