A problem with blocks that are collapsed by default, is that on page load, there is an unwanted fraction of a second that shows the blocks in expanded state, after which they are collapsed.
Is it possible to prevent the page from displaying the block, and render the collapsed block after Drupal has understood that the block is collapsed?
The same annoying effect i see with logintoboggan by the way. I can't imagine that there is not a solution to prevent this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

The blocks CSS is open, and it requires JavaScript (which is run after page load) to collapse them. So it is inevitable to see them open for a fraction.

polskikrol’s picture

Subscribe.

Wonder if there are any hooks to make it workaround the fact that the content loads with the block CSS open.

darvanen’s picture

Title: Page loads always with blocks expanded for a fraction for a second, then collapses » Load blocks with pre-set collapsed state.
Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes

Possible improvement for V2.

darvanen’s picture

Status: Active » Needs review
FileSize
722 bytes

This can be done when the theme in use implements content_attributes in the block template, otherwise the JS will kick in as fallback.

darvanen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.