as the title says how can i turn off auto complete of native.newTextField
thnx in advance [import]uid: 12482 topic_id: 27265 reply_id: 327265[/import]
as the title says how can i turn off auto complete of native.newTextField
thnx in advance [import]uid: 12482 topic_id: 27265 reply_id: 327265[/import]
bump (friendly ) [import]uid: 12482 topic_id: 27265 reply_id: 111101[/import]
I think what you’re speaking of is the auto complete of the device. The textfield doesn’t have auto complete.
To turn off auto complete on the device, go to Settings > General > Keyboard [import]uid: 14018 topic_id: 27265 reply_id: 111120[/import]
Can this be done programmatically? [import]uid: 155454 topic_id: 27265 reply_id: 111344[/import]
It can, it just is not supported at present.
Moved to feature requests. [import]uid: 84637 topic_id: 27265 reply_id: 111347[/import]
Here’s an easy way to get around autocomplete.
In the text field handler, simply add the following lines right at the beginning of the function:
local isSimulator = "simulator" == system.getInfo("environment")
if not isSimulator then
local ett = event.target.text
event.target.text = ett:sub(1,string.len(ett)-1)
event.target.text = ett
end
It’s brilliantly simple as it mimics how everyone manually gets around autocorrect by backspacing and retyping the letter again. It’s happens extremely fast and you cannot tell that anything is going on other than --no autocomplete-- .
I’ve tested it on an iPhone and an iPad.
[import]uid: 145435 topic_id: 27265 reply_id: 112781[/import]
Hi Lance,
AFAIK your code works great on iOS < 7. On iOS 7 it generates no output.
Is there any other way to disable autocomplete?
There is a bug in the latest public release that prevents this from working. It has been fixed in daily so next public version this should work I would think.
Oh, I wasn’t aware of that. Thank you for clarification
Hi Lance,
AFAIK your code works great on iOS < 7. On iOS 7 it generates no output.
Is there any other way to disable autocomplete?
There is a bug in the latest public release that prevents this from working. It has been fixed in daily so next public version this should work I would think.
Oh, I wasn’t aware of that. Thank you for clarification
Oh, I wasn’t aware of that either. This trick should be mentioned in the docs.
Oh, I wasn’t aware of that either. This trick should be mentioned in the docs.