Skip to content

Commit 921a79b

Browse files
authored
fix offset top calculation
in _showDatepicker() we use native input.offsetHeight but in _checkOffset() we use jquery's input.outerHeight() jquery's method returns more accurate height for zoomed out pages. In result _checkOffset()'s `offset.top === ( inst.input.offset().top + inputHeight )` never returns true
1 parent 54074fc commit 921a79b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/widgets/datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ $.extend( Datepicker.prototype, {
815815
}
816816
if ( !$.datepicker._pos ) { // position below input
817817
$.datepicker._pos = $.datepicker._findPos( input );
818-
$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
818+
$.datepicker._pos[ 1 ] += inst.input.outerHeight(); // add the height
819819
}
820820

821821
isFixed = false;

0 commit comments

Comments
 (0)