Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 384708

Summary: [Combo] Foreground color set by theming when Combo is disabled is not respected in IE8
Product: [RT] RAP Reporter: Daniel Ebert <Daniel.Ebert>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: christian.kuehl
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:

Description Daniel Ebert CLA 2012-07-10 06:55:00 EDT
Build Identifier: 20110916-0149

We use RAP for our products and our customers need very good readability of values even when the inputfields are not editable. Unfortunatly the Internet Explorer colors the text of a disabled Combo light-gray, which is quite unreadable on a light background.

RAP resp. QX renders a disabled inputfield with the HTML-Attribute 'disabled' which results in a textcolor as stated. Unfortunatly IE does not allow us to style the foreground-color with CSS.

Styling the Combo with SWT.READONLY results in a rendering as we want it, because then, the html-attribute 'readonly' is set on the inputfield. Again, unfortunatly, there is no 'setEditable' Method for Combo to set the readOnly-State at runtime, so we need to stick with the 'setEnabled' Method.

Reproducible: Always

Steps to Reproduce:
1. Place a Combo in a Container
2. call Combo.setEnabled(false) to disable it
3. Watch the result in IE
Comment 1 Ivan Furnadjiev CLA 2012-07-10 07:06:20 EDT
CCombo has a possibility to switch the read-only state at runtime (CCombo#setEditable(boolean)). You could give it a try.
Comment 2 Daniel Ebert CLA 2012-07-10 07:41:05 EDT
hi Ivan,

thank you for your reply. I tried using a CCombo as you suggested.

Setting the CCombo to not editable though has the effect, that only the textinput-field is not editable. The choicelist including the arrow-button stays active. Setting both, enabled and editable, to false leads to the same effect as it is with Combo.

CCombo unfortunatly is not helping here :-(
Comment 3 Ivan Furnadjiev CLA 2013-06-24 05:45:09 EDT
It's possible the change the Combo foreground color when it is disabled by theming:
Combo:disabled,
Combo[BORDER]:disabled {
  color: red;
}
Tested in Firefox, Chrome, IE9 and IE10. Doesn't work in IE8 and Opera only. We could consider this as a bug in IE8 and Opera. Tim, can we workaround this behavior somehow?
Comment 4 Ivan Furnadjiev CLA 2014-05-14 08:24:21 EDT
This issue does not exist in Opera 21. Still reproducible only in IE8 with RAP 2.3M3.
Comment 5 Ivan Furnadjiev CLA 2014-05-14 08:33:36 EDT
This seems to be a known weird behavior in IE8:
http://stackoverflow.com/questions/1411044/how-to-change-color-of-disabled-html-controls-in-ie8-using-css
Comment 6 Ivan Furnadjiev CLA 2014-08-07 04:54:54 EDT
The IE7/8 support is discontinued in RAP 3.0. Close as WONTFIX.