Skip to content

Commit fb0e81a

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 95bf49b commit fb0e81a

File tree

8 files changed

+75
-15
lines changed

8 files changed

+75
-15
lines changed

docs-aspnet-mvc/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Telerik UI for ASP.NET MVC supports:
3434
* [C#](https://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx) / [VB.NET](http://www.tutorialspoint.com/vb.net/)
3535
* [SharePoint 2010](https://msdn.microsoft.com/en-us/library/office/dd776256(v=office.12).aspx) and later
3636

37-
Telerik UI for ASP.NET MVC Visual Studio Extensions support Visual Studio 2012 and later.
37+
Telerik UI for ASP.NET MVC Visual Studio Extensions support Visual Studio 2015 and later.
3838

3939
## Download
4040

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Common Issues
3+
page_title: Common Issues | Kendo UI AutoComplete
4+
description: "Learn how to deal with issues you may encounter while using the Kendo UI AutoComplete widget."
5+
previous_url: /controls/editors/autocomplete/troubleshooting
6+
slug: troubleshooting_autocomplete_widget
7+
---
8+
9+
# Common Issues
10+
11+
This page provides solutions for common issues you might encounter while working with the Kendo UI AutoComplete widget.
12+
13+
## Chrome AutoFill Popup
14+
15+
`Chrome` browser ignores the `autocomplete="off"` and ignores any value set to the attribute if the input name matches one of the predefined autofill fields.
16+
17+
**Solution**
18+
19+
Toggle the name attribute on `focus` and `focusout`.
20+
21+
###### Example
22+
23+
<form>
24+
<input name="city" ID="City" required />
25+
</form>
26+
<script>
27+
var data = [
28+
"Toronto",
29+
"New York",
30+
"London",
31+
"Paris"
32+
];
33+
var name;
34+
var CityAutoComplete = $("#City").kendoAutoComplete({
35+
dataSource: data,
36+
filter: "startswith",
37+
placeholder: "Select city...",
38+
separator: ", "
39+
}).getKendoAutoComplete();
40+
41+
CityAutoComplete.element.on("focus", function () {
42+
name = this.name;
43+
this.name = kendo.guid().substr(0, 8);
44+
});
45+
CityAutoComplete.element.on("focusout", function () {
46+
this.name = name;
47+
});
48+
</script>
49+
50+
51+
**Solution**
52+
53+
Use a `name` attribute that is not contained in the predefined autofill fields of Chrome.
54+
55+
## See Also
56+
57+
* [AutoComplete JavaScript API Reference](/api/javascript/ui/autocomplete)

docs/controls/navigation/menu/contextmenu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ The following example demonstrates how to enable scrolling within the ContextMen
286286
</script>
287287

288288

289-
You can also customize the scrollable amount by setting a value (in pixels) to the [`distance` property](/kendo-ui/api/javascript/ui/contextmenu/configuration/scrollable.scrollabledistance). `distance` defaults to `50`.
289+
You can also customize the scrollable amount by setting a value (in pixels) to the [`distance` property](/kendo-ui/api/javascript/ui/contextmenu/configuration/scrollable.distance). `distance` defaults to `50`.
290290

291291
###### Example
292292

src/kendo.autocomplete.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var __meta__ = { // jshint ignore:line
4040
FOCUSED = "k-state-focused",
4141
SELECTED = "k-state-selected",
4242
STATEDISABLED = "k-state-disabled",
43+
AUTOCOMPLETEVALUE = support.browser.chrome ? "disabled" : "off",
4344
HOVER = "k-state-hover",
4445
ns = ".kendoAutoComplete",
4546
HOVEREVENTS = "mouseenter" + ns + " mouseleave" + ns,
@@ -113,7 +114,7 @@ var __meta__ = { // jshint ignore:line
113114
wrapper.removeClass(FOCUSED);
114115
})
115116
.attr({
116-
autocomplete: "off",
117+
autocomplete: AUTOCOMPLETEVALUE,
117118
role: "textbox",
118119
"aria-haspopup": true
119120
});

src/kendo.combobox.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var __meta__ = { // jshint ignore:line
4343
FOCUSED = "k-state-focused",
4444
STATEDISABLED = "k-state-disabled",
4545
ARIA_DISABLED = "aria-disabled",
46+
AUTOCOMPLETEVALUE = support.browser.chrome ? "disabled" : "off",
4647
STATE_FILTER = "filter",
4748
STATE_ACCEPT = "accept",
4849
STATE_REBIND = "rebind",
@@ -906,7 +907,7 @@ var __meta__ = { // jshint ignore:line
906907
input = wrapper.find(SELECTOR);
907908

908909
if (!input[0]) {
909-
wrapper.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input ' + name + 'class="k-input" type="text" autocomplete="off"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>')
910+
wrapper.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input ' + name + 'class="k-input" type="text" autocomplete="' + AUTOCOMPLETEVALUE +'"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>')
910911
.append(that.element);
911912

912913
input = wrapper.find(SELECTOR);

src/kendo.multiselect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ var __meta__ = { // jshint ignore:line
4848
STATEDISABLED = "k-state-disabled",
4949
DISABLED = "disabled",
5050
READONLY = "readonly",
51+
AUTOCOMPLETEVALUE = kendo.support.browser.chrome ? "disabled" : "off",
5152
ns = ".kendoMultiSelect",
5253
CLICK = "click" + ns,
5354
KEYDOWN = "keydown" + ns,
@@ -1421,7 +1422,7 @@ var __meta__ = { // jshint ignore:line
14211422

14221423
that._focused = that.input = input.attr({
14231424
"accesskey": accessKey,
1424-
"autocomplete": "off",
1425+
"autocomplete": AUTOCOMPLETEVALUE,
14251426
"role": "listbox",
14261427
"title": element[0].title,
14271428
"aria-expanded": false,

styles/web/common/spreadsheet.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ textarea.k-spreadsheet-clipboard {
452452
width: 100%;
453453
height: 100%;
454454
overflow: scroll;
455-
-webkit-overflow-scrolling: touch;
456455
position: absolute;
457456
z-index: 1;
458457
}

tests/combobox/initialization.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,19 @@ it("wraps element if no wrapper span.k-widget and hide element", function() {
6363
});
6464

6565
it("create a text input", function() {
66-
var combobox = new ComboBox(input.attr("name", "combo1"), {
67-
text: "test"
68-
});
66+
var autocompleteAttr = kendo.support.browser.chrome ? "disabled" : "off";
67+
var combobox = new ComboBox(input.attr("name", "combo1"), {
68+
text: "test"
69+
});
6970

70-
var text = combobox.input;
71+
var text = combobox.input;
7172

72-
assert.isOk(text.is("input"));
73-
assert.isOk(text.hasClass("k-input"));
73+
assert.isOk(text.is("input"));
74+
assert.isOk(text.hasClass("k-input"));
7475

75-
assert.equal(text.val(), "test");
76-
assert.equal(text.attr("autocomplete"), "off");
77-
assert.equal(text.attr("name"), "combo1_input");
76+
assert.equal(text.val(), "test");
77+
assert.equal(text.attr("autocomplete"), autocompleteAttr);
78+
assert.equal(text.attr("name"), "combo1_input");
7879
});
7980

8081
it("text input should be wrapped with span", function(){

0 commit comments

Comments
 (0)