ListGrids do not appear correctly in Chrome or IE8 when using standard doctype

We have found that ListGrids do not appear correctly under Google Chrome and Internet Explorer 8 (in IE8 mode) when specifying a standard doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

This seems to affect other WebKit based browsers as well.

Whilst the ListGrids look fine in Quirks mode we cannot use this as the rest of our site requires standards mode. When using the standard doctype (above) the table headings don’t line-up with the columns in IE8 and Chrome, and the headings row background images are not shown in IE8 (see the attached screenshots of a very simple table under different browsers in standards mode). On these screenshots the issue is small but certainly visible; in our code this is exacerbated as we use larger, more complex, tables (maybe also because we use our own style for the cells, in particular more left padding).

Are there any plans to improve compatibility with the latest browsers and standard doctypes?

Thanks,

Andrew

The source code used is:

VLayout container = new VLayout();
container.setWidth(500);
ListGrid grid = new ListGrid();
ListGridField test1 = new ListGridField("test1", "test1", 40);
ListGridField test2 = new ListGridField("test2", "test2");
ListGridField test3 = new ListGridField("test3", "test3", 40);
grid.setFields(new ListGridField[]{test1, test2, test3});
ListGridRecord record1 = new ListGridRecord();
record1.setAttribute("test1", 11);
record1.setAttribute("test2", 12);
record1.setAttribute("test3", 13);
ListGridRecord record2 = new ListGridRecord();
record2.setAttribute("test1", 21);
record2.setAttribute("test2", 22);
record2.setAttribute("test3", 23);
ListGridRecord record3 = new ListGridRecord();
record3.setAttribute("test1", 31);
record3.setAttribute("test2", 32);
record3.setAttribute("test3", 33);
grid.setData(new ListGridRecord[]{record1, record2, record3});
container.setAlign(Alignment.CENTER);
container.addMember(grid);

Hi Andrew,
Improved strict doctype support for IE8 and the latest versions of Safari / Chrome is one of the last features we’re getting into the 7.0 final release. Thanks for the clear reports on the issues you saw - these are already resolved in our internal code-base.
If you’re struggling with IE8 / strict mode issues right now you can always force IE8 to run in the IE7 emulation mode via the special X-UA-Compatible header

Thanks
Isomorphic Software

Hi,

Is this fixed SmartClient code included in SmartGWT 1.3?

Thanks,

Andrew

Yes, the grid misalignment issue should be fixed.

Hi,
On the same topic, just a reminder, in Safari/Chrome, the tilegrid doesn’t show the tiles when doctype is present. Details here:
http://forums.smartclient.com/showthread.php?t=5788
Thanks.

So far as we know this is not the case with the latest SmartGWT.

I have tried the latest SmartGWT (1.3) to see if the Grid alignment issue was solved.

In Safari/Chrome, the tables are now aligned correctly in Standards mode.

In Internet Explorer 8 standards mode (DOCTYPE set to HTML 4.01 Transitional), some modes that were not correctly aligned before are now working, but some modes that were working before are now broken (tables mis-aligned):

  • Browser Mode: “IE8” and Document Mode: “IE8 Standards” => works only in smartGWT 1.3 (didn’t work in smartGWT 1.2). This is the mode used by IE8 when the document contains <meta http-equiv=“X-UA-Compatible” content=“IE=8”>

  • Browser Mode: “IE8 Compat View” and Document Mode: “IE7 Standards” => works in both smartGWT 1.2 and 1.3. This is the mode used by IE8 when compatibility mode is enabled (by default, all intranet sites use compatibility mode) and the document contains <meta http-equiv=“X-UA-Compatible” content=“IE=7”>

  • Browser Mode: “IE8” and Document Mode: “IE7 Standards” => only works in smartGWT 1.2 (broken in smartGWT 1.3). This is the mode used by IE8 when compatibility mode is not enabled and the document contains <meta http-equiv=“X-UA-Compatible” content=“IE=7”>.

As we are using this last mode in our application, we cannot update to smartGWT 1.3. We cannot use “IE8 standards” document mode as some of our styles do not work correctly in “IE8 standards” document mode yet.

This should be very easy to test and reproduce using the IE8 Developer Tools as this allows to freely set the Browser and Document mode.

This seems to be an issue with the document mode detection (uses browser mode instead of document mode ?). SmartClient seems to use the IE8 javascript instead of the IE7 javascript when using “IE8” browser mode and “IE7 standards” document mode.

Hi Ghim
Thanks for the clear information on this.
We’ve added a fix to our mainline codebase to resolve the remaining bug with IE8 when rendering with the IE7 standards mode meta-tag
<meta http-equiv=“X-UA-Compatible” content=“IE=7”>

This fix will be available via SVN in the near future
Isomorphic Software

Hi,

We’ve just tested this with nightly build 814 and the IE8 problems are still present.

Thanks for your attention,

Andrew

Hi Andrew,
We added some code which resolved the problem in the test case we were running for this, so we thought we had this one in the bag.

I think we’re going to need a reproducible case from you to get to the bottom of the remaining bug(s).

Could you try to simplify your application down to a simple test case we can run on our end that demonstrates this problem? If you can just zip up the test case project and get it to us (attach it here or email it to support@isomorphic.com) that’d be ideal - alternatively if you can send us least the bootstrap HTML file for the project, the project config file XML file (with your various includes), and the source that defines and draw()s your ListGrid (or whatever other components do not render correctly).

Also let us know exactly what steps you’re taking to get to the badly rendered state and what you’re seeing when it happens.

Thanks
Isomorphic Software

Thanks for the sample code (recieved via email). It made it very straightforward to isolate the problem and it’s now been resolved as of the latest build (827), available here: http://www.smartclient.com/smartgwt/builds/latest/

Regards
Isomorphic Software

Hi,

I can confirm that we have tested using nightly build revision 827 and the problem has been fixed.

Regards,

Andrew

Similar problem in SmartClient

I’m experiencing a very similar problem in Smart Client. I just downloaded the most recent build (http://www.smartclient.com/builds/lgpl/ 12-02-09), but the problem is not fixed there. Is it possible to make the same fix in smartclient as you made in smartgwt?

As a side note, the tree grid does not load in a deterministic manner in the release from 12-02-09. For example, my json is like this (simplified slightly here – there are more attributes not shown and the report_name’s are truncated):

[{“parent_id”:null,“report_name”:“Eq”,“id”:1},
{“parent_id”:null,“report_name”:“Op”,“id”:2},
{“parent_id”:null,“report_name”:“In”,“id”:3},
{“parent_id”:1,“report_name”:“OpC”,“id”:4},
{“parent_id”:1,“report_name”:“QA”,“id”:5},
{“parent_id”:5,“report_name”:“Sy”,“id”:7},
{“parent_id”:5,“report_name”:“Or”,“id”:8},
{“parent_id”:7,“report_name”:“Is”,“id”:9},
{“parent_id”:7,“report_name”:“TiU”,“id”:10},
{“parent_id”:7,“report_name”:“TiC”,“id”:11},
{“parent_id”:7,“report_name”:“Ty”,“id”:12},
{“parent_id”:7,“report_name”:“PS”,“id”:13},
{“parent_id”:7,“report_name”:“Tic”,“id”:14},
{“parent_id”:7,“report_name”:“No”,“id”:15},
{“parent_id”:7,“report_name”:“ED”,“id”:16}]

However, the tree grid does not display the first few items in the order specified in the json (Eq, Op, In), nor does it in the subtrees. It does this fine in the latest 7.0rc2 LGPL I’ve been using.

Additionally, the icons appear to flicker more when you expand the tree. This is hard to give an example of – if you don’t notice this also, then maybe it’s just me:)

Thanks!
Julie

@jsilvestri This has been fixed and will show in the next nightly.