Closed (fixed)
Project:
Collapsiblock
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
10 Oct 2011 at 20:12 UTC
Updated:
8 Jan 2019 at 13:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aaronnaylor commentedI am wondering if there is any fix for this issue yet, or if one is coming soon. I love this module, but I'm not sure if I will be able to continue using it on my current project as it is. The re-scrolling issue makes the page really jumpy and it's pretty annoying... also, clicking on a link in the block causes block to collapse again (I have used CB in D6 and had no issue with it.) ... As admin, module works perfectly, when logged in as Authenticated or logged out is when issue shows up. Update please?
Comment #2
nathanjo commentedFor some reason, the js just return href="#".
Resolved this by modifying line#29 in collapsiblock.js:
Attached patch.
Comment #3
nathanjo commentedComment #4
essbee commentedrather 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('<a href="#" role="link" onclick="return false;"/>')This keeps the page position in the same place. The link isnt clickable anyway as this is hijacked by the collapsi event.
Thoughts?
Comment #5
Babymaggie commentedJust tried essbee's fix and I got to say it works great!
I was having the jumping screen problem so I tried the fix - Many thanks essbee
Also many thanks to the module creator - Great work!
Comment #6
gagarine commentedI guess we should use http://api.jquery.com/event.preventDefault/ instead. I don't want JS in html still if this html is dynamically created
Comment #7
dsdeiz commentedHi, just wondering if this would work.
Comment #8
dsdeiz commentedComment #9
gagarine commentedI committed suggestion from #2.
I try to move the preventDefault right after the event is fired, I'm not sure it make a difference but anyway is more readable.
So you can try the dev when is packaged and report if it works for you.
Comment #10
gagarine commentedComment #11
c4antonio commenteddon't work with the last dev version, i have same problem, works fine only when an user is logged in, anonymous user when click on block title collapsed go on the top of page
Comment #12
xaa commentedhi,
Same issue with the 7.x-1.0. and the patch from #2 is working fine.
Regarding this issue with a mobile eye, this was a major issue.
The fix is really needed for the mobile version :) many thanks
Comment #13
m.schwarzenberg commented#4 works wonderful - thanks essbee
Comment #14
GN commented#4 works for me, too -
when trying, don't forget to clear cache (it may seem not working when block caching is on and your old block is still in the cache).
Thank you essbee!
Comment #15
giorgosk@gagarine at #9
you say committed solution from #2 ?
there is no dev or official release after your post date !!
but anyone of the solutions above should work
Comment #16
giorgoskActually #2 still creates this problem #1568036: Browser jumps to top of page when block is opened
but #7 is behaving correctly and probably solves both problems
Comment #17
giorgoskJust to confuse the things a little more
on the same project at times #2 worked, #7 worked, but now reverted back to original .js file since patched versions were giving the same problem that were supposed to fix ??!!!
using omega 7.x 3.x subtheme if it makes any difference
Comment #18
jday commented#4 works for me
Comment #19
vinmassaro commented#4 was the only solution I found to work from this thread. I've rolled a patch against 7.x-1.x with this fix.
Comment #20
chefnelone commentedHas been this committed to the dev version? The patch is working.
Comment #21
vinmassaro commented@chefnelone: Thanks for testing. Hasn't been much activity on this module, so it doesn't look like it. Moving to RTBC.
Comment #22
rcharles commentedI was getting a conflict between administration menu module and collapsiblock module when both installed (Omega 3, Bartik and other themes had "section.div" set for appearance settings). What would happen was, a # character was getting inserted into the URL (ie sitename.com/path#), and whenever a block was collapsed or expanded it would cause the page to jump to the top.
Solution:
https://drupal.org/files/use-preventDefault-1305364-7.patch
Comment #23
darvanenFor the record, the dev version available for download does not have #19 installed.
Comment #24
kopeboy"Moving to RTBC" one year ago and still no patch in the dev version?!? wow
Comment #25
nevosa commented#22 solved the issue for me on 7.x-1.0.
Thanks.
Comment #26
jenniferannwalsh commented#22 patch also worked for me 7.x-1.0. Thanks rCharles!
Comment #27
brett1 commentedPatch from #22 worked for me too (#7)
Thanks, this is a great module but the flicking up to the top of the page was effecting it.
Comment #28
kenheim commentedPatch from #22 fixed it for me. Seems like it should be ready for a commit.
Comment #29
fitzed commentedPatch from #22 worked for me too. Thank you!
Comment #30
darvanenRerolled #7/#22 patch on current dev release for test queue.
Comment #31
System Lord commented#22 worked for me. I only noticed it on my android and now it's fixed. Thank you!
Btw..something is strange. Patch at #22 looks like this:
Patch #30 looks like this:
If both are for DEV why are they different?
Also, Darvanen, unless i dont understand what "rerolled" means should that have updated the DEV date/version and been listed in the "view commits"? Is this thread the "test queue" ? Not griping. Just trying to understand.
Comment #32
darvanenHi @System Lord,
They're different because patch #22 was made for an old version of the dev branch. That is, the dev branch has had some changes made and committed since #22. This means when you try to use the patch it works, but it doesn't give the patch program exactly what it is expecting, and the automatic patch testing system doesn't like that.
Note that on https://www.drupal.org/node/332678 it states:
So I 'rerolled' it (basically just opened the dev branch at its current commit state and ran the patch) in order to make it test properly, and to make it slightly easier to commit for the maintainers.
Seems it hasn't been queued for testing yet, I'm not sure why.
Comment #33
System Lord commentedUnderstood, darvanen...thanks!
Comment #34
gagarine commentedcommited
Comment #37
semanthis commentedProblem still appears in 8.x-2.0.
e.preventDefault(); fixes the problem there es well.