MozillaZine

Scrolling problem - works in chrome

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Olhanzilla

User avatar
 
Posts: 139
Joined: February 10th, 2005, 8:29 pm

Post Posted August 15th, 2015, 12:31 am

Here is a page showing attempts to fix a division at the top of the page and correctly position a main division below it. Problems occur if you scroll down.

http://thetesting.site/fixeddiv/fixedheader-fixed.html

Go try it and see if you get the scrolling problem described there,

Then try it in Chrome - works satisfactorily.

I have FF 38.0.5 - don't say "new version" this should work properly in just about any FF release - I don't expect visitors to my sites to have the absolutely newest and greatest...

I believe there is a setting I can change in about:config but, again, I don't expect users to set options to get my pages to work as they do in Chrome.

I have not tested the page with IE - my main system is down and I'm on a a netbook I happened to acquire (needed new screen and was headed for the dumpster - cost about $15 for screen, zero of DIY installation) and for whatever reason IE isn't on it. I did a full restore from the restore partition but IE wasn't installed????

I started to install IE 11 and but they warn that it may require custom settings and may install other software - I don't install things which give such vague statements.

Any thoughts?

EDIT - I meant to point out a page where the issue of how much is scrolled is brought up - it may apply but, again, I'm not going to detect FF and tell the user to go set the option - I should even have to consider such an absurd thing. -- http://superuser.com/questions/568339/how-to-configure-arrow-key-scroll-step-in-firefox

DanRaisch
Moderator

User avatar
 
Posts: 117636
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted August 15th, 2015, 4:04 am

Moving to Web Development.

Olhanzilla

User avatar
 
Posts: 139
Joined: February 10th, 2005, 8:29 pm

Post Posted August 16th, 2015, 3:03 am

Moving a post to Development is effectively taking it off the forums completely.

Development is a desert - have you looked at the dates on the newest dozen or so posts?

AlfonsoML
 
Posts: 382
Joined: September 6th, 2006, 1:39 pm

Post Posted August 16th, 2015, 4:41 am

The question that you link in your page doesn't work, so I guess that you have found your solution. One possibility is to add a margin to the "content" so it doesn't overlap with the header, and other options would be to use flexbox, but I'm not gonna try to provide a detailed solution as you didn't expect one here.

DanRaisch
Moderator

User avatar
 
Posts: 117636
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted August 16th, 2015, 11:13 am

I moved this to a forum where folks with some expertise on the subject might see it and be interested in offering assistance. Just the fact that there are more recent posts in Support doesn't mean that anyone there would be jumping in to offer you a solution.

Dom1953
 
Posts: 52
Joined: July 24th, 2014, 6:02 am
Location: Australia

Post Posted August 16th, 2015, 6:42 pm

The desired result sounds reasonable. It would be nice if keyboard scrolling (using space/page up/page down) or clicking the scroll strip (but not the bar) resulted in vertical scrolling by some amount of pixels less than

( viewport height in pixels
+ the height of any fixed element with a css top attribute value
+ the height of any fixed element with a css bottom attribute value)

whereas Firefox and IE actually scroll by about 95% if the entire view port height irrespective of the presence of elements with fixed position.

You could file a bug/enhancement request on mozilla bugzilla to address the problem, but there are issues. For example how to automate handling multiple fixed elements with non zero top/bottom values or z ordering? A complete solution might need a new CSS attribute to allow authors to define their own requirements.

FWIW I am not entirely sure that an elegant solution using CSS and/or Javascript is actually feasible. Have you considered doing nothing? Users who click in the scroll bar background are likely to use their mouse wheel for finer adjustments and I seem to recall hitting space bar and having to up arrow a bit on some sites.

Olhanzilla

User avatar
 
Posts: 139
Joined: February 10th, 2005, 8:29 pm

Post Posted August 17th, 2015, 2:15 pm

The problem really has nothing to do with all of the fixed and unfixed divs.

Use this forum page - highlight a word on the word at the bottom of view port and press pagedown and you will see how much is scrolled.

The issue came up because I was working with the page at http://thetesting.site/fixeddiv/fixedheader-fixed.html

I am trying to make a fixed div at the top which will occupy the top of the viewport such that scrolling will occur in relation to the bottom of the fixed div, not the top of the viewport.

I don't want to lose lines underneath the fixed div - I know things will scroll but I want it to scroll so that the line with the highlighted word is positioned relative to the bottom of the fixed div, not the top of the viewport.

As it is, the lines below the viewport are scrolling under the fixed div and are "lost."

I know this can be done, I've seen it but haven't dug deeply enough into the source of page which accomplish the feat

That a look at https://mapalong.com/hello

I am currently dissecting that page, removing all the nonessential material to get at the core and find out just how it is being done.

I've made some progress on it but I am now at a point where something I removed is causing JavaScript errors - probably a reference is being made to an element I removed. -- will get back on it tomorrow.

Olhanzilla

User avatar
 
Posts: 139
Joined: February 10th, 2005, 8:29 pm

Post Posted August 17th, 2015, 2:18 pm

Some how managed to post the same comment several times - I a blanking out this one and will do the others.
Last edited by Olhanzilla on August 17th, 2015, 2:31 pm, edited 1 time in total.

Olhanzilla

User avatar
 
Posts: 139
Joined: February 10th, 2005, 8:29 pm

Post Posted August 17th, 2015, 2:28 pm

Some how managed to post the same comment several times - I a blanking out this one and will do the others.

Olhanzilla

User avatar
 
Posts: 139
Joined: February 10th, 2005, 8:29 pm

Post Posted August 17th, 2015, 2:36 pm

Dom1953

I said to use the pagedown button but should also have said it occurs when you click the scroll bar (bar not up and down arrows)

I'm talking about a scroll action which moves the viewport up or down relative to the page.

That is, a scroll action which shows the previous or next "thunk" of the page, not scrolling with the arrow buttons or the arrows on the scroll bar.

The problem is when scrolling an entire viewport's worth of the page.

jscher2000

User avatar
 
Posts: 10077
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted August 17th, 2015, 6:49 pm

That used to be a problem with the fixed "short" header that appears as you scroll down pages on Mozilla support, but it seems to work okay now. Example: https://support.mozilla.org/questions/1078170

johnmacd
 
Posts: 33
Joined: June 13th, 2013, 4:27 am

Post Posted April 18th, 2016, 5:52 am

Type about:config in the URL and filter general.smoothScroll.mouseWheel.durationMaxMS change the value as 1000 and try it.

DanRaisch
Moderator

User avatar
 
Posts: 117636
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted April 18th, 2016, 9:53 am

Thanks but you've replied to a thread that died 8 months ago. It's doubtful anyone was waiting for input on the issue.

Locking due to the age of the original posts.

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 1 guest