Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Firefox problem when showing/hiding table rows

 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have run into some weird behaviour on Firefox.

I am hiding/showing table rows based on the radio button clicked by the user.
Everything works fine, except in one particular case, when the display for one of the rows gets distorted.

And the problem only appears in Firefox (tested on 1.5.* and 2 beta), and at least not on the latest versions of IE, Opera and Konqueror (ver. 3.4.2).

The following code is the most I could simplify my original code to, I tried to make the row names as explanatory as possible.
Click the radio box named 'R2,3,5 (Not OK)' to see the buggy behaviour.

I observed a couple of peculiar things -

1. On resizing the browser a fraction, the display is corrected.
2. If a row is made visible after the problematic row, the display stays ok. (Click on R5,6 (OK) to see this)

So, I am inclined to believe that this might be a bug in page rendering by the browser.
I would, of course, be happy to be proven wrong

For now, my work around is to add another row with the max no. of columns used and set its visibility to 'hidden', and that solution is working fine.
I would love to hear of a better suggestion though.

Cheers,
Sonny

P.S. Please remove the <remove_this> text in JavaScript event handlers (on<remove_this>load)



[EDIT - fixed formatting of the code block - Sonny]
[EDIT - fixed code according to Eric's advice - Sonny]
[EDIT - Tested OK on Konqueror - Sonny]
[ August 14, 2006: Message edited by: Sonny Gill ]
[ August 14, 2006: Message edited by: Sonny Gill ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get table-row to work, do the following:


Eric
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,

Great tip, Thanks. I am using that now.

But, the original problem described in my post is still the same...any ideas on that?

I am hoping to get an opinion from people more experienced with JS/DOM, before I go through the trouble of downloading Mozilla nightly build and trying to reproduce the bug on that.

Cheers.

- Sonny
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed code to include Eric' advice, tested on konqueror, and bumped up
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic