Skip to content

Commit 370d1e5

Browse files
committed
fix(list): Loader is displayed when remote request is prevented on requestStart #3056
1 parent 9477a9f commit 370d1e5

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

src/kendo.list.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,9 +1032,13 @@ var __meta__ = { // jshint ignore:line
10321032
that._showClear();
10331033
},
10341034

1035-
_showBusy: function () {
1035+
_showBusy: function (e) {
10361036
var that = this;
10371037

1038+
if(e.isDefaultPrevented()){
1039+
return;
1040+
}
1041+
10381042
that._request = true;
10391043

10401044
if (that._busy) {

tests/combobox/aria.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,39 @@ asyncTest("ComboBox adds aria-busy=true when loader is shown", 1, function() {
151151
filter: "startswith"
152152
});
153153

154-
combobox._showBusy();
154+
var e = {
155+
isDefaultPrevented: function(){
156+
return false;
157+
}
158+
};
159+
160+
combobox._showBusy(e);
155161

156162
setTimeout(function() {
157163
start();
158164
equal(combobox.input.attr("aria-busy"), "true");
159165
}, 150);
160166
});
161167

168+
asyncTest("ComboBox does not adds aria-busy=true when loader is prevented", 1, function() {
169+
var combobox = new ComboBox(input, {
170+
dataSource: ["item1", "item2"],
171+
filter: "startswith"
172+
});
173+
174+
var e = {
175+
isDefaultPrevented: function(){
176+
return true;
177+
}
178+
};
179+
combobox._showBusy(e);
180+
181+
setTimeout(function() {
182+
start();
183+
equal(combobox.input.attr("aria-busy"), "false");
184+
}, 150);
185+
});
186+
162187
test("ComboBox adds aria-busy=false when loader is hidden", 1, function() {
163188
var combobox = new ComboBox(input, {
164189
dataSource: ["item1", "item2"],

0 commit comments

Comments
 (0)