Skip to content

Commit

Permalink
Merge pull request #11 from robooneus/master
Browse files Browse the repository at this point in the history
Added Autocomplete, Autocorrect, Spellcheck, and Autocapitalize controls
  • Loading branch information
ajimix authored Feb 12, 2017
2 parents f1f7175 + c3da460 commit dda9e24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions input.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit dda9e24

Please sign in to comment.