Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 280731 - [Table] Javascript error in IE 6/8 when column width is zero
Summary: [Table] Javascript error in IE 6/8 when column width is zero
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: sr121
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-18 05:09 EDT by Erdal Karaca CLA
Modified: 2009-06-30 17:34 EDT (History)
0 users

See Also:


Attachments
works in IE (795 bytes, patch)
2009-06-18 06:30 EDT, Erdal Karaca CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erdal Karaca CLA 2009-06-18 05:09:20 EDT
This is a follow up of http://www.eclipse.org/newsportal/article.php?id=6734&group=eclipse.technology.rap#6734

---- Error Message:------------------------------------
Could not evaluate javascript response:

Ungültiges Argument.

org.eclipse.swt.EventUtil.suspendEventHandling();
[...]
org.eclipse.swt.Request.getInstance().enableUICallBack();

---------------------------------------------------------

(Note: lines between suspendEventHandling/enableUICallBack were removed)

What I figured out:

If in a TableViewer column i is empty, i.e. getText of its label provider always returns an empty string for column at position i, then this error will occur.
When the label provider just returns dummy values for column i, this does not happen.

Affected browsers: IE 6/8 (I did not install 7)
Working browsers: Opera 9.60, Firefox 3.0.8

I will try to extract a demo to reproduce this error...
Comment 1 Erdal Karaca CLA 2009-06-18 05:22:04 EDT
IE 8 has a nice js debugger:

The problem seems to be this line:
node.style.width=width+org.eclipse.swt.widgets.TableItem.PX

"width" is not initialized(?), i.e. it has -1 as its value

I suppose rwt cannot determine a column width as all cells of that column are empty and the variable "width" remains uninitialized. But IE complains about "-1px" not being a valid argument (which does make sense).

Where is that js created? I would like to check/validate this and rerun with the patched version...
Comment 2 Erdal Karaca CLA 2009-06-18 06:30:04 EDT
Created attachment 139529 [details]
works in IE

This patch resolves the issue in IE8.

Though, I am not sure why the width is decremented by 1 before being set...
Comment 3 Rüdiger Herrmann CLA 2009-06-18 07:21:36 EDT
(In reply to comment #2)
> This patch resolves the issue in IE8.
> 
> Though, I am not sure why the width is decremented by 1 before being set...
Thanks for the patch, we will look into this.
Comment 4 Rüdiger Herrmann CLA 2009-06-30 17:31:51 EDT
Applied the patch with a slight modification.