Skip to content

Commit dcbaf94

Browse files
committed
Sync with Kendo UI Professional
1 parent d1f9b24 commit dcbaf94

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

docs-aspnet/installation/msi-install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ To configure the NuGet package source, follow the steps in the [Installing with
7171
You will find the following in the {{ site.product }} installation directory:
7272

7373
* `js`—These are the minified JavaScript files.
74-
* `styles`—The minified CSS files and images used by the themes.
74+
* `styles`—The non-minified CSS files used by the themes.
7575
* `src`—Contains an informational `README` saying that you must visit [your Telerik account](https://www.telerik.com/login/) to download the `source.zip` package with the JavaScript, CSS, and C# source code. This directory is not available in the trial version.
7676
* `VSExtensions`—The extensions for Visual Studio.
7777
* `typescript`—The TypeScript definitions for the Kendo combined scripts (`kendo.all`, `kendo.dataviz`, `kendo.web`, and `kendo.mobile`).

src/kendo.autocomplete.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ var __meta__ = {
258258
.attr(ARIA_DISABLED, disable)
259259
.attr(ARIA_READONLY, readonly);
260260
}
261+
262+
that._toggleCloseVisibility();
261263
},
262264

263265
close: function() {
@@ -682,7 +684,7 @@ var __meta__ = {
682684
that._loading.addClass(HIDDENCLASS);
683685
that.element.attr("aria-busy", false);
684686
that._busy = null;
685-
that._showClear();
687+
that._toggleCloseVisibility();
686688
},
687689

688690
_showBusy: function() {
@@ -796,7 +798,9 @@ var __meta__ = {
796798
},
797799

798800
_toggleCloseVisibility: function() {
799-
if (this.value()) {
801+
var preventShow = this.element.is(":disabled") || this.element.is("[readonly]");
802+
803+
if (this.value() && !preventShow) {
800804
this._showClear();
801805
} else {
802806
this._hideClear();

tests/autocomplete/initialization.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,26 @@ it("enable() enables widget after readonly()", function() {
425425
assert.isOk(!autocomplete.wrapper.hasClass("k-disabled"));
426426
});
427427

428+
it("enable(false) hides clear icon", function() {
429+
var autocomplete = new AutoComplete(input, {
430+
value: "Montana"
431+
});
432+
433+
autocomplete.enable(false);
434+
435+
assert.isOk(autocomplete._clear.hasClass("k-hidden"));
436+
});
437+
438+
it("readonly(true) hides clear icon", function() {
439+
var autocomplete = new AutoComplete(input, {
440+
value: "Montana"
441+
});
442+
443+
autocomplete.readonly(true);
444+
445+
assert.isOk(autocomplete._clear.hasClass("k-hidden"));
446+
});
447+
428448
it("AutoComplete honors readonly attribute", function() {
429449
var autocomplete = new AutoComplete(input.attr("readonly", true));
430450

0 commit comments

Comments
 (0)