Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

autoscroll-ngview#227

Merged
tomwayson merged 1 commit intomasterfrom
autoscroll-ngview
Feb 15, 2016
Merged

autoscroll-ngview#227
tomwayson merged 1 commit intomasterfrom
autoscroll-ngview

Conversation

@jwasilgeo
Copy link
Copy Markdown
Contributor

resolves #226; added autoscroll property to ng-view to scroll to the top on route change

@tomwayson please check it out. No rush. I think it is a decent fix if on a desktop browser, but when it is responsive (e.g. mobile device) the scroll to the top behavior might be jarring.

As an alternative, I played around with the following during the route change listener (see leftNavController.js) to actually scroll to, say an <h2 id="xyzID"> element in an example page, but I still saw the JSAPI flickering/flashing somtimes.

$location.hash('xyzID');
$anchorScroll();

added autoscroll property to ng-view to scroll to the top on route change
@tomwayson
Copy link
Copy Markdown
Member

@jwasil

only thing holding me back from merging is that this feels like treating the symptom and not the problem. I think the root cause is upstream in the JSAPI, so I say we leave this open until 4.0 final is released and see if it gets solved there. If not, we can merge this as a band aid.

@jwasilgeo
Copy link
Copy Markdown
Contributor Author

Agreed!

tomwayson added a commit that referenced this pull request Feb 15, 2016
@tomwayson tomwayson merged commit 28fecf2 into master Feb 15, 2016
@tomwayson tomwayson deleted the autoscroll-ngview branch February 15, 2016 17:03
@tomwayson
Copy link
Copy Markdown
Member

just changed my mind. just left a note to selves to reverse this later #235

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.

Autoscroll docs site when routing to a new example page

2 participants