[TIMOB-19150] iOS: Add ability to turn off auto-complete and auto-suggest on Keyboard
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-08-03T03:15:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.0.0 |
Components | iOS |
Labels | keyboard |
Reporter | Ingo Muschenetz |
Assignee | Hans Knöchel |
Created | 2015-07-02T21:53:29.000+0000 |
Updated | 2017-03-20T17:57:18.000+0000 |
Description
*Suggested option that we need to expose:*
http://stackoverflow.com/questions/24031362/ios8-xcode-how-to-remove-quicktype-on-uikeyboard-auto-complete-auto-suggest
*New property "showUndoRedoActions", example code:*
var showUndoRedoActions = true
var win = Ti.UI.createWindow({backgroundColor: "#fff",layout: "vertical"});
var field = Ti.UI.createTextField({width: 300,height: 30,top: 100,backgroundColor: "#f0f0f0"});
var btn = Ti.UI.createButton({title: "Toggle field"});
field.showUndoRedoActions = showUndoRedoActions;
btn.addEventListener("click", function() {
showUndoRedoActions = !showUndoRedoActions;
field.showUndoRedoActions = showUndoRedoActions;
});
win.add(field);
win.add(btn);
win.open();
Attachments
File | Date | Size |
---|---|---|
keyboardbuttons.gif | 2015-10-14T17:13:33.000+0000 | 200407 |
Simulator Screen Shot 10 Jul 2015 11.34.07 am.png | 2015-07-10T03:38:58.000+0000 | 94951 |
The suggested option is to control this through:
textField.autocorrectionType = UITextAutocorrectionTypeNo;
This is already possible usingfield.autocorrect = false;
which does the desired function. [~ingo] Or am i missing something?[~hansknoechel], you are right. Looks like we already have this function. Then can you please update the documentation to inform this and put in a PR? Look at apidoc/Titanium/UI/TextField.yml. find relevant autocorrect set method an include a comment like
This can be used to remove quickType for iOS
. Might as well do this for TextArea.yml too.PR pending: https://github.com/appcelerator/titanium_mobile/pull/6956
Autofill suggestions and completions are covered by setting autocorrect to false. The undo/redo buttons can only be disabled system-wide as far as i know. Will look that up.
Sorry [~hansknoechel], i just checked this on iPad air 2 simulator, and even if the autocorrect is set to
false
, the undo, redo buttons are still there. See attached screenshot. !Simulator Screen Shot 10 Jul 2015 11.34.07 am.png|thumbnail! Please explore ways to disable that via iOS SDK. if there's no way to do that, indicate to us where in settings user can disable that.Updated PR to cover the toggle of the undo/redo actions. [~cng] will review next week.
CR and FT passed. PR merged.
PR here to fix backward compatibility for Xcode6. https://github.com/appcelerator/titanium_mobile/pull/7002
[~hansknoechel], [~cng], The buttons on top of the keyboard do toggle, but the buttons *on* the keyboard do not. Please see the attached gif. Is there a way we can also toggle the buttons on the keyboard or would the keyboard style have to be toggled manually, as well? !keyboardbuttons.gif|thumbnail!
The undo / redo buttons on the keyboards cannot be accessed directly, since they are part of the keyboard itself. This ticket only allows the ability to disable them inside the toolbar attached to the keyboard.
Closing ticket as fixed.