Skip to main content

Search and Top Navigation

#14980 new bug ()

Opened June 02, 2016 07:49PM UTC

Last modified July 26, 2016 03:41PM UTC

Datepicker: Misaligned when attached to a hidden input, inside of a fixed-positioned element, when scrolled down

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

Here's an example:

Here's the code:

And a screenshot:

Happens in both Chrome and Firefox, unsure about other browsers.

To recreate:

1. Open the example

2. Scroll down and click "Open Fancybox"

3. Click the "..." button

I dug through the jQuery UI source code a bit. When the input element has a "fixed" ancestor, then it puts the ui-datepicker-div into "fixed" position mode too, but the offset calculation is incorrect.

Here's a monkey-patch I created:

I haven't thoroughly tested it, but it fixes this particular case.

This is with the patch applied:

Reproduced in both jQuery UI 1.11.4 and 1.10.5.

Attachments (0)
Change History (1)

Changed July 26, 2016 03:41PM UTC by scottgonzalez comment:1

component: ui.coreui.datepicker