Added autofocus option (defaults to true) and a mobile fix for "ok_function" and "cancel_function".