1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    55
    Vote Rating
    8
    andong is on a distinguished road

      0  

    Default [4.2.1 744] fieldCls not work while field is empty

    [4.2.1 744] fieldCls not work while field is empty


    I added a fieldCls property for a textfield to display a small icon on its left side in a logon page, but the field will repeat the icon in whole field while I clear the textfield's text, when I input a word it works fine and only display one icon on its left side.

    css:
    Code:
    .userName
    {
        background-image: url(image/login-user.png) !important;
        background-repeat: no-repeat;   
        background-position: left;
    }
    I debuged and I have found that ext matched the css named 'input.x-form-invalid-field, textarea.x-form-invalid-field' instead of my customed css 'userName' when the field's text was cleared, I think this is the key issue.
    Last edited by andong; 12 May 2013 at 7:31 PM. Reason: Added version

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,900
    Vote Rating
    176
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    You'll need to put !important after the background repeat / position rules if you want them to supersede rules from the default ExtJS CSS.

  3. #3
    Sencha - Ext JS Dev Team Phil Guerrant's Avatar
    Join Date
    May 2011
    Location
    Colorado
    Posts
    276
    Vote Rating
    77
    Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice

      0  

    Default


    Quote Originally Posted by slemmon View Post
    You'll need to put !important after the background repeat / position rules if you want them to supersede rules from the default ExtJS CSS.
    Or just increase their specificity

    Code:
    .x-field input.userName { ... }
    Phil Guerrant
    Ext JS - Development Team

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    55
    Vote Rating
    8
    andong is on a distinguished road

      0  

    Default


    Quote Originally Posted by slemmon View Post
    You'll need to put !important after the background repeat / position rules if you want them to supersede rules from the default ExtJS CSS.
    Thanks, It works fine.

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi