You found a bug! We've classified it as EXTJSIV-6375 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    100
    Vote Rating
    -1
    Dipish has a little shameless behaviour in the past

      0  

    Default Default ext-all.css obstructs adding outline to focused elements in Webkit

    Default ext-all.css obstructs adding outline to focused elements in Webkit


    REQUIRED INFORMATION




    Ext version tested:
    • Ext 4.0.7
    • Ext 4.1

    Browser versions tested against:
    • Chrome

    DOCTYPE tested against:
    • HTML5

    Description:
    The default ExtJS' styles prevents me from styling elements' :focus state in Webkit.


    Steps to reproduce the problem:
    • Create an empty HTML page with ExtJS loaded
    • Add a <input type="text" /> element (for the sake of example, this can be any focusable element)
    • Add something like this to your custom css:
      Code:
      input[type="text"]:focus {
      outline: solid 1px red;
      }
    • Focus the input element

    The result that was expected:
    • The element should get a red outline

    The result that occurs instead:
    • No outline



    HELPFUL INFORMATION


    These are the lines that are causing the trouble:
    In Ext 4.0.7 gpl
    Code:
    .x-webkit :focus {
    outline: none !important;
    }
    In Ext 4.1.0-beta-1:
    Code:
    /*misc*/
    /* line 5, ../themes/stylesheets/ext4/default/widgets/form/_all.scss */
    .x-webkit *:focus {
      outline: none !important; }
    I understand that you probably need these rules but they get into the way if I DO want to set outline to focused elements via pure CSS.

    The current workaround is to add !important to your custom styles (which is known as bad practice and makes your code less manageable), e.g.:
    Code:
    input[type="text"]:focus {
    outline: solid 1px red !important;
    }
    Please find a better solution.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    7,185
    Vote Rating
    194
    scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold

      0  

    Default


    Thank you for the report!

    Regards,
    Scott.

Tags for this Thread