-
31 May 2012 1:15 AM #1
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
In Ext 4.1.0-beta-1:Code:.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.Code:/*misc*/ /* line 5, ../themes/stylesheets/ext4/default/widgets/form/_all.scss */ .x-webkit *:focus { outline: none !important; }
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.:
Please find a better solution.Code:input[type="text"]:focus { outline: solid 1px red !important; }
-
3 Jun 2012 4:14 PM #2
Thank you for the report!
Regards,
Scott.
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.


Reply With Quote