I'm reproducing a site I did in D6 where I had/have a series of collapsible blocks. On the D6 site, clicking on the block title will open the block and the cursor stays on the block title - as it should. The browser scrolling doesn't change.

But on the D7 site, when a block that's far enough down the page to make the browser scroll is clicked, the browser jumps to the top of the page, making the opened block "disappear" unless the user scrolls down to find it.

Definitely a bug, but one that wouldn't be encountered unless the block is far enough down the page. Any ideas here? Thanks!

Comments

zorax’s picture

I have the same problem.
Ma page is long, the users switching with masquerade, I can't use for specially for connexion block.

bcobin’s picture

In starting back in to work today, it seems the problem is gone.

Perhaps some javascript weirdness after a long day's work? I will chalk this up to "settling in" and report back should I see it again... odd...

smerth’s picture

Version: 7.x-1.x-dev » 7.x-1.0

Hi guys, I have Collapsiblock (7.x 1.0) installed on a D7 site. After changing the default css classes for an Omega sub theme (as outlined in this issue queue,) I got the blocks to collapse.

Unfortunately, when you click the title to collapse or uncollapse) it jumps to the top of the page.

I will try switching the theme to Bartik and see if that helps... Maybe Omega specific?

smerth’s picture

Also, the block opens and closes properly when logged in (user 1) without jumping to the top of the page but for anon users it jumps to the page top... block still collapses/uncollapses... but the jump from way down a long page to the top is jarring.. (I suspect that many people have this problem but because the block is not positioned down below the fold on the page they don't know they have the issue because its jumping to where they are already - top of the page,... haha.. kinda funny.. but annoying little bug... )

smerth’s picture

Here's something I observed... when you are logged in as user 1 and hover over the link the status bar shows "Go to # on this page" but when you click the link the URL remains http://foo.com When you are not logged in and click the link the Browser actually sends you to http://foo.com/# and thats when the page jumps to the top... hmmm... interesting... but what to do about it??

bgrega’s picture

Any word on the page jumping yet? I have multiple colapsing blocks on a page. All but one of them is working properly. Thanks.

gagarine’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

I suppose this is fixed in the dev version.

peterbkk’s picture

We have the same problem, you can see Collapsiblock in action here http://www.lelapinbangkok.com/sandwiches

You'll notice when you scroll down the menu to the blocks that are collapsed and expand, it'll take you to the top of the page.

peterbkk’s picture

I have fixed the issue following this post,

"rather than this, which I find still makes the page jump around and thus doesnt provide as nice a UX. Could we instead just add
.wrapInner('')
This keeps the page position in the same place. The link isnt clickable anyway as this is hijacked by the collapsi event.

Thoughts?"

From essbee, http://drupal.org/node/1305364

GiorgosK’s picture

please try the solution from #7 #1305364: Expanding blocks reloads page for non-admin users it should solve this problem

manoloka’s picture

fureigh’s picture

Status: Active » Closed (duplicate)

The solution from #7 worked for me too: https://drupal.org/node/1305364#comment-6185096.

Closing this ticket as a duplicate because that patch seems to solve both problems.