Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Non scrolling sidebar when the screen is wide makes content inacessible #4

Open
pauloneves opened this issue Mar 3, 2017 · 2 comments

Comments

@pauloneves
Copy link

If the page is narrow, the side bar .xs3p-sidebar goes to the top and the content is below. When I scroll the page it scrolls down normally.

If I resize the browser window to a wide size, the .xs3p-sidebar becomes fixed and doesn't scroll anymore. If its content is bigger than the windows size, it becomes impossible to access all the content in the side bar.

I believe the error is in the piece of code below, but I couldn't solve it:

               $(window).scroll(function() {
                  if ($(".xs3p-sidebar").css("position") == "fixed" && $(window).height() < $(".xs3p-sidebar").height()) {
                     var perc = $(window).scrollTop() / $("#xs3p-content").height();
                     var overflow = $(".xs3p-sidebar").height() + 105 - $(window).height();
                     $(".xs3p-sidebar").css("top", (65 - Math.round(overflow * perc)) + "px");
                  }
               });

I'm viewing my xsd schema file in Mozilla Firefox version 53 and processing it just adding the tag as the second line of my schema file.

BTW, thanks for the nice project.

@pauloneves
Copy link
Author

I've just saw that the bug just happens when using firefox internal xslt processor. Generating the file through xsltproc.exe everything worked fine. Maybe it isn't a bug anymore.

@ademar59
Copy link

I have the same issue
I resolved it by changing the ccs style
.xs3p-sidebar {
position: fixed;
top: 65px;
width: 22%;
height: 100%;
overflow: auto;
}

on line 828

and it's works for me

sdiraimondo added a commit to sdiraimondo/xs3p that referenced this issue Apr 26, 2017
Fix the issue as proposed on the comments (bitfehler#4)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants