Skip to content

Commit ea486b4

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 7d88f1f commit ea486b4

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

src/kendo.list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ var __meta__ = { // jshint ignore:line
20162016
return deferred;
20172017
}
20182018

2019-
if (singleSelection && !filtered && $.inArray(last(indices), selectedIndices) !== -1) {
2019+
if (singleSelection && !filtered && $.inArray(last(indices), selectedIndices) !== -1 && that._emptySearch) {
20202020
if (that._dataItems.length && that._view.length) {
20212021
that._dataItems = [that._view[selectedIndices[0]].item];
20222022
}

styles/web/type-material.less

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,15 +2178,6 @@ div.k-filebrowser-dropzone em
21782178
.composite-background(@button-active-gradient);
21792179
}
21802180

2181-
// Focus Active
2182-
&:focus.k-state-active,
2183-
&.k-state-focused.k-state-active {
2184-
color: @button-focused-active-color;
2185-
border-color: @button-focused-active-background;
2186-
background: @button-focused-active-background;
2187-
box-shadow: none;
2188-
}
2189-
21902181
// Disabled state
21912182
&.k-state-disabled,
21922183
.k-state-disabled&,

tests/combobox/suggestion.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ it("widget does not suggest when input is empty", function() {
282282

283283
combobox.input.focus();
284284
combobox.input.val("");
285+
combobox.input.trigger("blur");
285286
combobox.refresh();
286287

287288
assert.equal(combobox.text(), "");
@@ -301,5 +302,25 @@ it("suggest int values on search", function() {
301302
assert.equal(combobox.input.val(), "1");
302303
});
303304

305+
it("reselects same index items after clearing input", function() {
306+
combobox = new ComboBox(input, {
307+
dataTextField: "text",
308+
dataValueField: "value",
309+
dataSource: data,
310+
suggest: true,
311+
delay: 0
312+
});
313+
314+
combobox.input.focus();
315+
combobox.search("baz");
316+
combobox.select(0);
317+
318+
combobox.input.val("");
319+
combobox.open();
320+
combobox.select(0);
321+
322+
assert.equal(combobox.text(), "Foo");
323+
});
324+
304325
});
305326
}());

0 commit comments

Comments
 (0)