Opened 9 years ago
Last modified 9 years ago
#9495 open bug
Datepicker: hidden input is positioned incorrectly in fixed div
Reported by: | SpoonNZ | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.10.3 |
Keywords: | rewrite position | Cc: | |
Blocked by: | Blocking: |
Description
If you have a datepicker with a hidden main input (for example, if you're using both an altField and showOn:button), this doesn't position correctly on the page if it is within a fixed element.
The possibility of a hidden main input is considered in places in the code, as is the possibility of a fixed parent, however both in tandem doesn't appear to have been handled correctly.
A JSFiddle showing the problem is available at http://jsfiddle.net/aPrAv/. Scroll down the page a bit - the relatively positioned datepicker appears correctly, however the fixed position one doesn't.
A fix has been submitted to https://github.com/jquery/jquery-ui/pull/1050
Change History (5)
comment:1 follow-up: 3 Changed 9 years ago by
comment:3 Changed 9 years ago by
Definitely is an edge case, however the strange part is that having the hidden input is specifically catered for elsewhere in the code (a function or two below my patch), so obviously an edge case that has been hit before.
Another very feasible scenario for having the hidden input would be with AJAX - choose a date and it just sends through an AJAX request to load some content. Could very easily see how this wouldn't have the date displayed on screen.
comment:4 Changed 9 years ago by
Status: | new → open |
---|---|
Summary: | Datepicker with hidden input is positioned incorrectly in fixed div → Datepicker: hidden input is positioned incorrectly in fixed div |
Good points. Regardless of how we end up fixing this I'll mark this as valid.
comment:5 Changed 9 years ago by
Keywords: | rewrite position added |
---|
Hi SpoonNZ,
Thanks for taking the time to contribute to the jQuery UI project. While this is a problem, having a hidden input within a fixed parent definitely seems like an edge case to me. And... switching to use the position utility will take care of this.
Therefore my vote is that we hold off on this, but I'll wait for another opinion. scott.gonzalez?