Skip to content

Commit bd789e9

Browse files
committed
Sync with Kendo UI Professional
1 parent d80ee65 commit bd789e9

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

src/kendo.combobox.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,11 @@ var __meta__ = {
850850
that._accessor(text);
851851
}
852852

853-
that._cascadeTriggered = true;
854-
that._triggerCascade();
853+
if (that._isValueChanged(text)) {
854+
that._cascadeTriggered = true;
855+
that._triggerCascade();
856+
}
857+
855858
that._refreshFloatingLabel();
856859
}
857860

src/kendo.list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,9 +905,9 @@ var __meta__ = {
905905

906906
if (that._isValueChanged(value)) {
907907
trigger = true;
908-
} else if (that._valueBeforeCascade !== undefined && that._valueBeforeCascade !== unifyType(that._old, typeof that._valueBeforeCascade) && that._userTriggered) {
908+
} else if (that._valueBeforeCascade !== undefined && that._isValueChanged(that._valueBeforeCascade) && that._userTriggered) {
909909
trigger = true;
910-
} else if (index !== undefined && index !== that._oldIndex && !that.listView.isFiltered()) {
910+
} else if (index !== undefined && index !== that._oldIndex && !that.listView.isFiltered() && !that.options.virtual) {
911911
trigger = true;
912912
}
913913

src/kendo.textbox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ var __meta__ = {
189189
_clearValue: function(e) {
190190
this.element.val("");
191191
this.element.focus();
192-
this.trigger(CHANGE, { value: "", originalEvent: e });
192+
this.element.trigger(CHANGE, { value: "", originalEvent: e });
193193
this._hideClear();
194194
},
195195

@@ -244,7 +244,7 @@ var __meta__ = {
244244

245245
element.on("focusin" + NS, that._focusin.bind(that));
246246
element.on("focusout" + NS, that._focusout.bind(that));
247-
element.on("change" + NS, that._change.bind(that));
247+
element.on(CHANGE + NS, that._change.bind(that));
248248
element.on(INPUT_EV + NS, that._input.bind(that));
249249
} else {
250250
element.attr(DISABLED, disable)

tests/textbox/api.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,15 @@
148148
textbox.setOptions({ label: false });
149149
assert.isOk(!textbox.element.closest(".k-floating-label-container").length);
150150
});
151+
it("clearButton does not retain value", function() {
152+
var textbox = new TextBox(input, {
153+
value: "Test",
154+
clearButton: true
155+
});
156+
157+
$(textbox.wrapper).find(".k-clear-value").trigger("click");
158+
var value = textbox.value();
159+
assert.equal("", value);
160+
});
151161
});
152162
}());

0 commit comments

Comments
 (0)