Closed ryhcu404 closed 7 years ago
I've found the culprit and a workaround, although I'm not sure of the repurcussions (I've not found any so far). To get this working (for at least Chrome, Firefox, IE, and Android in-app browser), comment out the line "tot = fixer;" as follows in the slidebox js file:
_sbox_pos: function() {
var fixer, ech, top, par, tot, w = this;
w.d.intHTML.find("div.ui-datebox-sliderow-int").each(function() {
ech = $(this);
par = ech.parent().outerWidth();
fixer = ech.outerWidth();
if (w.__("isRTL")) {
top = ech.find("div").last();
} else {
top = ech.find("div").first();
}
tot = ech.find("div").length * top.outerWidth();
if (fixer > 0) {
//tot = fixer;
}
top.css("marginLeft", (tot - par) / 2 * -1);
});
},
Any repercussions on this? (I don't honestly know what that bit does anymore. I know, I know, comments in code). My guess is it was an edge case anyway, which is now working the other way. In particular, does it bone IOS?
We've been running this workaround in production for several weeks now with no issues found. (We had personally tested on numerous iOS and Android devices.) I was not able to determine what fringe case the "fixer" line was for, but I know the slidebox was unusable without the fix on both iOS and Android.
rock on. I'll drop that on in next time I have a chance. Thanks.
This is in. SHA: a478baf26c957e8c72f2c76aa360e6d9c7287782
Thanks!
I've experienced this issue on the SlideBox demo itself on this page http://dev.jtsage.com/DateBox/, as well as in my test environment: JqueryMobile (v1.4.5) jquery-mobile-datebox (v4.2.3) Firefox and Chrome (at least)