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

Bug 395822

Summary: Space characters missing in table items in IE 9
Product: [RT] RAP Reporter: Jacek Wozniak <jacek.wozniak>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.5   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
A snippet to reproduce the issue. none

Description Jacek Wozniak CLA 2012-12-05 10:04:56 EST
Created attachment 224310 [details]
A snippet to reproduce the issue.

If a table item contains more than one space character between words then only one space is shown. For example, a string with 5 spaces: "5_____5" is displayed as "5 5".

When you hover the mouse over the item or click on the table (or Tab to give it focus) it gets expanded and the correct text is displayed.
You can observe this strange behavior when:
- running in IE 9 / IE 10 Release Preview for Win 7 and
- the initial focus is set to another control than the table containing spaces and
- running 2nd or next instance of the application.

The problem has existed since RAP 1.5.0.
I tested also using Eclipse 4.3M3 / RAP 2.0M3 (and nightly build 2012-12-04).

There is no problem when running in IE 8, FireFox, Chrome, Safari (Windows).

Steps to reproduce:
1. Run the attached snippet in IE 9.
2. Press Refresh/F5 in the browser to start a new application instance (the first one works fine).
3. The spaces are missing, so hover the mouse over the table items (or click) to update them to show the correct text.
Comment 1 Tim Buschtoens CLA 2012-12-07 11:34:38 EST
Can reproduce it, but works fine in older IE.

Seems like a timing issue to me: If the Table is rendered for the first time it is not yet visible, which might cause element.innerText not to work correctly for some reason (IE bug). A quickfix could be to use innerHTML again for IE9+. A propper future solution should proppably use createTextNode with \u00a0 chars.
Comment 2 Tim Buschtoens CLA 2013-03-15 10:46:49 EDT
Fixed with commit 5eec8949370965b7de656acf2e1663f182ea4198.

In unit tests the issue was also reproduceable in IE8, so i fixed it by checking for visibility and escaped the text accordingly (manually when invisible, otherwise with innerText.)