Fixing the logic for the toggleWhatYouControl show/hide bit.

work item: 17528

--HG--
branch : 1.x
This commit is contained in:
Nathan Heskew
2011-03-29 13:14:04 -07:00
parent f966a2d369
commit 2d2ff2d9a4

View File

@@ -137,10 +137,12 @@
var _this = $(this); var _this = $(this);
var _controllees = $("[data-controllerid=" + _this.attr("id") + "]"); var _controllees = $("[data-controllerid=" + _this.attr("id") + "]");
var _controlleesAreHidden = _controllees.is(":hidden"); var _controlleesAreHidden = _controllees.is(":hidden");
if (_this.is(":checked") && _controlleesAreHidden) { if (_this.is(":checked")) {
if (_controlleesAreHidden) {
_controllees.hide(); // <- unhook this when the following comment applies _controllees.hide(); // <- unhook this when the following comment applies
$(_controllees.show()[0]).find("input").focus(); // <- aaaand a slideDown there...eventually $(_controllees.show()[0]).find("input").focus(); // <- aaaand a slideDown there...eventually
} else if (!(_this.is(":checked") && _controlleesAreHidden)) { }
} else if (!_controlleesAreHidden) {
//_controllees.slideUp(200); <- hook this back up when chrome behaves, or when I care less...or when chrome behaves //_controllees.slideUp(200); <- hook this back up when chrome behaves, or when I care less...or when chrome behaves
_controllees.hide() _controllees.hide()
} }