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?

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

  • Thanks Mohith! I was aware of what was causing the issue, but knowing what kind of don't solve the problem I have :) . – Marc-Antoine Veilleux Mar 17 '17 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 – Mohith Shrivastava Mar 17 '17 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. – Scott Covert Mar 28 '17 at 22:52
  • 1
    @TrevorBliss Here is where I see it should be mentioned documentation.auraframework.org/lockerApiTest/… – Mohith Shrivastava Apr 8 '17 at 1:31
  • 1
    Ah yes, I'll make sure that gets updated. – TrevorBliss Apr 10 '17 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.