From 5e1acd5f67bb6b0af9591c842e9d1051fdcc9b39 Mon Sep 17 00:00:00 2001 From: robooneus Date: Fri, 10 Feb 2017 15:36:57 +0100 Subject: [PATCH 1/2] Update input.coffee Propose adding simple controls for autocorrect, autocomplete, spellcheck, and autocapitalize within module. --- input.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/input.coffee b/input.coffee index 792b5e9..a34ddc3 100644 --- a/input.coffee +++ b/input.coffee @@ -38,6 +38,10 @@ class exports.Input extends Layer options.virtualKeyboard ?= if Utils.isMobile() then false else true options.type ?= "text" options.goButton ?= false + options.autocorrect ?= "on" + options.autocomplete ?= "on" + options.autocapitalize ?= "on" + options.spellcheck ?= "on" super options @@ -48,6 +52,10 @@ class exports.Input extends Layer @input.value = options.text @input.type = options.type @input.placeholder = options.placeholder + @input.setAttribute "autocorrect", options.autocorrect + @input.setAttribute "autocomplete", options.autocomplete + @input.setAttribute "autocapitalize", options.autocapitalize + @input.setAttribute "spellcheck", options.spellcheck @form = document.createElement "form" if options.goButton From c3da4603eba44363158dc0ef8b9dddccdb65b456 Mon Sep 17 00:00:00 2001 From: robooneus Date: Sat, 11 Feb 2017 13:14:11 +0100 Subject: [PATCH 2/2] camelCase --- input.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/input.coffee b/input.coffee index a34ddc3..dda720c 100644 --- a/input.coffee +++ b/input.coffee @@ -38,10 +38,10 @@ class exports.Input extends Layer options.virtualKeyboard ?= if Utils.isMobile() then false else true options.type ?= "text" options.goButton ?= false - options.autocorrect ?= "on" - options.autocomplete ?= "on" - options.autocapitalize ?= "on" - options.spellcheck ?= "on" + options.autoCorrect ?= "on" + options.autoComplete ?= "on" + options.autoCapitalize ?= "on" + options.spellCheck ?= "on" super options @@ -52,10 +52,10 @@ class exports.Input extends Layer @input.value = options.text @input.type = options.type @input.placeholder = options.placeholder - @input.setAttribute "autocorrect", options.autocorrect - @input.setAttribute "autocomplete", options.autocomplete - @input.setAttribute "autocapitalize", options.autocapitalize - @input.setAttribute "spellcheck", options.spellcheck + @input.setAttribute "autocorrect", options.autoCorrect + @input.setAttribute "autocomplete", options.autoComplete + @input.setAttribute "autocapitalize", options.autoCapitalize + @input.setAttribute "spellcheck", options.spellCheck @form = document.createElement "form" if options.goButton