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: |
Description
Here's an example: https://jsbin.com/zijipej/2
Here's the code: https://gist.github.com/anonymous/8cf1943bd68df44d80d5e855455c2a3d
And a screenshot: http://i.imgur.com/x40UB5o.png
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: https://gist.github.com/mnpenner/4a52366150deaa44d377c872c7d1fda3
I haven't thoroughly tested it, but it fixes this particular case.
This is with the patch applied: https://jsbin.com/zijipej/3
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 comment:1
component: | ui.core → ui.datepicker |
---|