From a3afffdbbd4afc625b6980d7251d99f55a8f47d2 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Wed, 20 Jul 2011 12:59:20 -0400 Subject: [PATCH] restored autocorrect/complete disabling, as it was implemented in the page plugin already. --- js/jquery.mobile.forms.textinput.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index 2fae262f..c5bbb71f 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -39,6 +39,18 @@ $.widget( "mobile.textinput", $.mobile.widget, { input.addClass("ui-input-text ui-body-"+ o.theme ); focusedEl = input; + + // XXX: Temporary workaround for issue 785. Turn off autocorrect and + // autocomplete since the popup they use can't be dismissed by + // the user. Note that we test for the presence of the feature + // by looking for the autocorrect property on the input element. + if ( typeof input[0].autocorrect !== "undefined" ) { + // Set the attribute instead of the property just in case there + // is code that attempts to make modifications via HTML. + input[0].setAttribute( "autocorrect", "off" ); + input[0].setAttribute( "autocomplete", "off" ); + } + //"search" input widget if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {