3

When I try to set the autocorrect on an input I got the following warning in my browser console:

WARNING: SecureElement: [object HTMLInputElement]{ key: {"namespace":"c"} } does not allow getting/setting the autocorrect attribute, ignoring!

Any way I can set it? Will we support it some day in LockerService?

1 Answer 1

5

Only salesforce Locker dev team can confirm this but looking into the locker API document its not supported for sure currently .Also looked into the locker code and supported HTMLElements for the input are as below

            "HTMLInputElement": {
            "accept":                         DEFAULT,
            "align":                          DEFAULT,
            "alt":                            DEFAULT,
            "autocapitalize":                 DEFAULT,
            "autocomplete":                   DEFAULT,
            "autofocus":                      DEFAULT,
            "checkValidity":                  FUNCTION,
            "checked":                        DEFAULT,
            "defaultChecked":                 DEFAULT,
            "defaultValue":                   DEFAULT,
            "dirName":                        DEFAULT,
            "disabled":                       DEFAULT,
            "files":                          DEFAULT,
            "form":                           DEFAULT,
            "formAction":                     DEFAULT,
            "formEnctype":                    DEFAULT,
            "formMethod":                     DEFAULT,
            "formNoValidate":                 DEFAULT,
            "formTarget":                     DEFAULT,
            "height":                         DEFAULT,
            "incremental":                    DEFAULT,
            "indeterminate":                  DEFAULT,
            "labels":                         DEFAULT,
            "list":                           DEFAULT,
            "max":                            DEFAULT,
            "maxLength":                      DEFAULT,
            "min":                            DEFAULT,
            "minLength":                      DEFAULT,
            "multiple":                       DEFAULT,
            "name":                           DEFAULT,
            "pattern":                        DEFAULT,
            "placeholder":                    DEFAULT,
            "readOnly":                       DEFAULT,
            "reportValidity":                 FUNCTION,
            "required":                       DEFAULT,
            "select":                         FUNCTION,
            "selectionDirection":             DEFAULT,
            "selectionEnd":                   DEFAULT,
            "selectionStart":                 DEFAULT,
            "setCustomValidity":              FUNCTION,
            "setRangeText":                   FUNCTION,
            "setSelectionRange":              FUNCTION,
            "size":                           DEFAULT,
            "src":                            DEFAULT,
            "step":                           DEFAULT,
            "stepDown":                       FUNCTION,
            "stepUp":                         FUNCTION,
            "type":                           DEFAULT,
            "useMap":                         DEFAULT,
            "validationMessage":              DEFAULT,
            "validity":                       DEFAULT,
            "value":                          DEFAULT,
            "valueAsDate":                    DEFAULT,
            "valueAsNumber":                  DEFAULT,
            "webkitEntries":                  DEFAULT,
            "webkitdirectory":                DEFAULT,
            "width":                          DEFAULT,
            "willValidate":                   DEFAULT
        }

Anything other than those are simply thrown exception by locker code

enter image description here

8
  • Thanks Mohith! I was aware of what was causing the issue, but knowing what kind of don't solve the problem I have :) . Mar 17, 2017 at 19:31
  • 1
    True .Would look for someone from SFDC to put a solution. However I would still like to keep the answer so it helps someone know what's causing this Mar 17, 2017 at 19:32
  • 1
    Thanks for going through the aura/ls source to find this Mohith; like Marc-Antoine I'd like the ability to disable autocorrect/spellcheck so I too hope someone from Salesforce can shed light on why this is blocked currently. Mar 28, 2017 at 22:52
  • 1
    @TrevorBliss Here is where I see it should be mentioned documentation.auraframework.org/lockerApiTest/… Apr 8, 2017 at 1:31
  • 1
    Ah yes, I'll make sure that gets updated. Apr 10, 2017 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .