This project is archived and is in readonly mode.

#775 ✓resolved
Massimiliano Torromeo

Element show/hide fail to reassign the original display to tbody elements (and possibly others)

Reported by Massimiliano Torromeo | October 27th, 2009 @ 05:34 PM

Try calling hide and then show on a tbody element. The tbody is then displayed with "display:block".

I used to implement Element.show and Element.hide in my own mootools extension, and it worked great. It was mainly identical, except from the fact that I falled back to setting an empty display instead of "block" if the original display could not be retrieved.

Current hide:
return this.store('originalDisplay', d || 'block').setStyle('display', 'none');

Working hide:
return this.store('originalDisplay', d || '').setStyle('display', 'none');

Current show:
return this.setStyle('display', display || this.retrieve('originalDisplay') || 'block');

Working show:
return this.setStyle('display', display || this.retrieve('originalDisplay') || '');

Thanks a lot.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages