1. go to the url above 2. try and select a line in the table EXPECT: clicking on a line selects it OBTAINED: nothing 3. open the page in Firefox: runs as expected.
I don't know if this is the only problem, but when I open the demo page in WebKit I get an error that can be traced back to the fact that the href property of the CSSStyleSheet corresponding to the <style> element is null, whereas in Firefox it is the URL of the HTML file.
(In reply to comment #1) > the href property of the CSSStyleSheet corresponding to the <style> element is null, > whereas in Firefox it is the URL of the HTML file. Changing this (in HTMLStyleElement::childrenChanged) fixes the bug (and breaks none of the tests), however, according to http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet "For inline style sheets, the value of [the href] attribute is null", so current behavior is the correct one.
(In reply to comment #0) > 1. go to the url above > 2. try and select a line in the table > EXPECT: clicking on a line selects it > OBTAINED: nothing > > 3. open the page in Firefox: runs as expected. > The problem seems to come from the second stylesheet (stylesheet[1]) declared at line 7 : <style type="text/css"> body { background: threedface; } </style> Then, when it arrives to this line : if (document.styleSheets[1].href.indexOf('columnlist.css') == -1) { continue; } it can't find any .href.indexOf('columnlist.css') for this style and return an error which stop the script.
(In reply to comment #3) > (In reply to comment #0) > > 1. go to the url above > > 2. try and select a line in the table > > EXPECT: clicking on a line selects it > > OBTAINED: nothing > > > > 3. open the page in Firefox: runs as expected. > > > > The problem seems to come from the second stylesheet (stylesheet[1]) declared > at line 7 : > <style type="text/css"> > body { background: threedface; } > </style> > > Then, when it arrives to this line : > if (document.styleSheets[1].href.indexOf('columnlist.css') == -1) { > continue; } > it can't find any .href.indexOf('columnlist.css') for this style and return an > error which stop the script. > I replaced, in the script the lines 269 and 1190 by : if (document.styleSheets[n].href != null && document.styleSheets[n].href.indexOf('columnlist.css') == -1) { continue; } Everything seems to work now.
(In reply to comment #2) > Changing this (in HTMLStyleElement::childrenChanged) fixes the bug (and breaks > none of the tests), however, according to > http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet > "For inline style sheets, the value of [the href] attribute is null", so > current behavior is the correct one. This is an evangelism issue.
It would be interesting to know what MSIE 6/7 returns for 'document.styleSheets[n].href' in this case as well.
Sent a mail message to Emil & Erik regarding this issue: http://webfx.eae.net/contact.html
Thanks for bringing this to my attention. This clearly seems to be a bug in the WebFX ColumnList code rather in WebKit. I'll make the necessary changes to the script.
(In reply to comment #8) > Thanks for bringing this to my attention. > > This clearly seems to be a bug in the WebFX ColumnList code rather in WebKit. > > I'll make the necessary changes to the script. This example still seems to be broken. I get a JavaScript error when loading the web page with a recent ToT WebKit build with Safari 3 Public Beta on Tiger: TypeError: Null value http://webfx.eae.net/dhtml/collist/includes/columnlist.js Line: 269