You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 13-09-2013 14:27:42

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

[RESOLVED] Bug in margin-left of content with sidebar & changing pages

Hi.

Some time ago I found bug (in Opera 12, Chrome 29, Firefox 3.5.19, IE 10) with placing content in wrong position when:

(first read text than use instruction to see what is happening)
1) I open page with sidebar, i.e. on my website.
2) After that when I open page without sidebar (i.e. LabVIEW page on my website) content is moved with margin-left style in the position where sidebar from previous page ends.
3) If you try to refresh website without sidebar, margin-left it removed / set to 0px and everything looks good.

Any idea how to repair this bug? My idea is to run some function that zeros margin-left of content in pages and after that if showSidebar() function from inc/sidebar.php is used it will set it to proper value. I know that it can be done with code from inc/sidebar.php lines 108-109 but I don't know where I should but this code to make it works.

Anyone can help with that problem?

Last edited by chrismaliszewski (17-09-2013 14:40:13)

Offline

#2 13-09-2013 18:30:25

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: [RESOLVED] Bug in margin-left of content with sidebar & changing pages

Fixed in upcoming beta. Thanks for reporting.

Offline

#3 13-09-2013 18:54:35

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: [RESOLVED] Bug in margin-left of content with sidebar & changing pages

Could you post solution here when it's done or at least write files where changes are needed to be done, please and thank you in advance!

I prefere not to update current version of my and only change what is necessary.

PS. No problem.

Last edited by chrismaliszewski (13-09-2013 18:54:49)

Offline

#4 13-09-2013 18:58:20

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: [RESOLVED] Bug in margin-left of content with sidebar & changing pages

Okay, I'll write it out, but it's a very difficult fix and takes a very long time.

Steps:
1. Open js/main.js
2. Go to line 103

$content.fadeOut(50,function(){

and replace with

$content.css("margin-left",0).fadeOut(50,function(){

That's it wink

Offline

Board footer

Powered by FluxBB