Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Fix for scrolling when the user has already scrolled.#2095

Closed
remy wants to merge 1 commit intojquery-archive:masterfrom
remy:master
Closed

Fix for scrolling when the user has already scrolled.#2095
remy wants to merge 1 commit intojquery-archive:masterfrom
remy:master

Conversation

@remy
Copy link

@remy remy commented Jul 17, 2011

fix for scrolling the window when the user has already started scrolling - apparent when slow download and user is ahead of content or when jQM is being used on desktop platform - ref http://remysharp.com/doing-it-right-skipping-the-iphone-url-bar/

…ing - apparent when slow download and user is ahead of content or when jQM is being used on desktop platform - ref http://remysharp.com/doing-it-right-skipping-the-iphone-url-bar/
@remy
Copy link
Author

remy commented Jul 17, 2011

I should have added this, but you can see it on @aral's site - just scroll down whilst it's loading and it'll jump.

@scottjehl
Copy link

Woops. Yeah, spot-on. Cool, care to update the pull then?

@remy
Copy link
Author

remy commented Jul 17, 2011

No time - literally running out the door to leave for day long training - can do next week when got a few mins!

@gseguin
Copy link
Contributor

gseguin commented Sep 1, 2011

That request has gone stale. @remy could you update it with what you agreed on with @scottjehl?

@scottjehl
Copy link

I think this generally covers what we want to do:
https://gist.github.com/1183357

We'll need to adapt it to jQM, but same principle.

On Sep 1, 2011, at 5:23 PM, gseguin wrote:

That request has gone stale. @remy could you update it with what you agreed on with @scottjehl?

Reply to this email directly or view it on GitHub:
#2095 (comment)

@eddiemonge
Copy link
Contributor

@remy @scottjehl Following up on is this is still valid or needs to be updated.

@johnbender
Copy link
Contributor

This appears to be a problem of determining the performance tradeoffs of scrollTop and a scrollstart when deciding whether to scroll to the default home scroll value

$window.load( function() {
    if( $window.scrollTop() <= 1 ) {
        $.mobile.silentScroll();
    }
});

I'm also confused by @scottjehl's snippet that suggests we should only be scrolling to 1 or 0 when the scrollTop value is greater than 1 given that we're trying to avoid scrolling when the user has altered the value by scrolling.

@johnbender
Copy link
Contributor

@scottjehl

Wanted to pop this back on your radar. Two questions:

  1. My previous question still requires clarification, we really don't want to scroll if the scrollTop value is greater than 1 right?
  2. I'd like to avoid firing up the scrollstart machinery if we can (first time sets up the watch and then triggers the event). Does anyone have sense for which is worse reflow or scrolling machinery (@jblas?)

@johnbender
Copy link
Contributor

@remy @scottjehl

I'm going to close this one in my next pass if there isn't movement. Seems like it isn't hyper critical right now.

@scottjehl
Copy link

Well, I still think we should make the change if we haven't already. It should probably be added as an issue though - this pull didn't contain the proper fix quite yet if I remember right?

On Apr 3, 2012, at 2:34 AM, John Bender wrote:

@remy @scottjehl

I'm going to close this one in my next pass if there isn't movement. Seems like it isn't hyper critical right now.


Reply to this email directly or view it on GitHub:
#2095 (comment)

@johnbender
Copy link
Contributor

@scottjehl

Right you are. Closing in favor of the #3958.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants