1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    55
    Vote Rating
    6
    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,770
    Vote Rating
    165
    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
    Join Date
    May 2011
    Posts
    149
    Vote Rating
    56
    Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough

      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
    6
    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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar