diff --git a/qui/controls/buttons/Select.js b/qui/controls/buttons/Select.js index 5f823bb3c8e4c8e11fefc2b34988e209ba225517..d4893d57d830f1837171788422ae5c8d6cd2051b 100644 --- a/qui/controls/buttons/Select.js +++ b/qui/controls/buttons/Select.js @@ -338,8 +338,19 @@ define('qui/controls/buttons/Select', [ var i, len, childvalue; var children = this.$Menu.getChildren(); + function isNumeric(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + } + for (i = 0, len = children.length; i < len; i++) { - if (children[i].getAttribute('value') === value) { + childvalue = children[i].getAttribute('value'); + + if (childvalue === value) { + this.$set(children[i]); + return this; + } + + if (isNumeric(value) && childvalue === parseInt(value)) { this.$set(children[i]); return this; }