Results 1 to 3 of 3

Thread: Disable autocomplete/autofill

  1. #1
    Sencha Premium User
    Join Date
    Dec 2010
    Posts
    276
    Answers
    8

    Default Disable autocomplete/autofill

    Having a real problem lately with chrome wanting to autofill many fields in a large ExtJS application even when autofill is disabled in chrome. Is there anything I can set to disable this for the entire application?

  2. #2
    Sencha MVP Team Member
    Join Date
    Sep 2016
    Location
    Kennewick, WA
    Posts
    147
    Answers
    15

    Default

    This is an issue with Chrome dating back to 2015. Chrome ignores the W3C specification for autocomplete=off and are doing their own thing. There have actually been several issues created for Chrome. One such issue is #468153. This was opened March 17, 2015 and given an updated status of "WontFix" and then closed in March of 2016.

    So no, there isn't anything you can do other than create convoluted code generating random naming conventions that would solve this issue Google refuses to fix.
    Andy Allord
    Sencha MVP/Software Engineer

  3. #3
    Sencha Premium Member matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    82
    Answers
    1

    Default

    Extjs is the Framework that must handle this, we know is powerfull in handling browser compatibility with old browsers , I guess you will provide some fixes for lastest one's.

    one jquery plugin has done this: https://github.com/terrylinooo/jquery.disableAutoFill

    now seems that the problem is not only autocomplete=off, but also the name. I like to have my forms with correct name when I use form.getValues() and have {name: 'Name', description: 'Desc...'} for some entities that don't represents user name for example.

    but the big problem is with "combo boxes" and tag fields that have name like "language", "languages"

    screenshot.2019-06-27 (1).jpg

    screenshot.2019-06-27.jpg

    i'm using:
    Code:
    Ext.define('SDL.overrides.form.field.Text', {
        override: 'Ext.form.field.Text',
    
    
        afterRender: function () {
            this.callParent(arguments);
    
    
            // fix https://www.sencha.com/forum/showthread.php?471764
            if (Ext.isChrome) {
                this.inputEl.set({
                    autocomplete: this.name ? 'new-' + this.name : 'none'
                });
            }
        }
    });

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •