Skip to content

Commit a3afffd

Browse files
author
scottjehl
committed
restored autocorrect/complete disabling, as it was implemented in the page plugin already.
1 parent 79cef2c commit a3afffd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

js/jquery.mobile.forms.textinput.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ $.widget( "mobile.textinput", $.mobile.widget, {
3939
input.addClass("ui-input-text ui-body-"+ o.theme );
4040

4141
focusedEl = input;
42+
43+
// XXX: Temporary workaround for issue 785. Turn off autocorrect and
44+
// autocomplete since the popup they use can't be dismissed by
45+
// the user. Note that we test for the presence of the feature
46+
// by looking for the autocorrect property on the input element.
47+
if ( typeof input[0].autocorrect !== "undefined" ) {
48+
// Set the attribute instead of the property just in case there
49+
// is code that attempts to make modifications via HTML.
50+
input[0].setAttribute( "autocorrect", "off" );
51+
input[0].setAttribute( "autocomplete", "off" );
52+
}
53+
4254

4355
//"search" input widget
4456
if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {

0 commit comments

Comments
 (0)