Hello there,

I have a script generated by an external website that I have added to a Drupal block in my website. I would like this block to be collapsible as to have the whole form open is ugly and too large on the page in question.

My script looks like this (I've changed the particulars):

I have added a title field and filled in all other necessary fields.

Is it possible that the collapse isn't working because of the kind of content that is in the block?

Thank you in advance for any helpful insight.

Martha

Comments

lilbebel’s picture

Helloooo,

Any kind person have any wisdom or insight into my quandary?

lilbebel’s picture

I imagine then that imported external open source scripts behave unpredictably in Drupal and that this is my issue?

sonvir249’s picture

Issue summary: View changes

Hi @lilbebel,

I your script contains active class in anchor tag, then blocks will be expanded by default.
This code is addded in collapsiblock.js file.

// Leave active blocks uncollapsed. If the block is expanded, do nothing.
          if (stat ==  4 || (cookieData[id] == 0 || (stat == 3 && cookieData[id] == undefined)) && !$(this).find('a.active').size()) {

To tackle this issue you can apply this patch.
Blocks are expanded with active menu link

Thank you.

darvanen’s picture

Status: Active » Closed (duplicate)