From 4e815232278460d9d1210e08015dafdbb2dce4df Mon Sep 17 00:00:00 2001 From: Keith Wood Date: Fri, 22 Jan 2010 10:10:17 +0000 Subject: Datepicker: Fixed #5085 bug in findPos for RTL languages --- ui/jquery.ui.datepicker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 45d514a33..6e5fe8b00 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -730,8 +730,10 @@ $.extend(Datepicker.prototype, { /* Find an object's position on the screen. */ _findPos: function(obj) { + var inst = this._getInst(obj); + var isRTL = this._get(inst, 'isRTL'); while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { - obj = obj.nextSibling; + obj = obj[isRTL ? 'previousSibling' : 'nextSibling']; } var position = $(obj).offset(); return [position.left, position.top]; -- cgit v1.2.3