Skip to content

Update interval causes scrollbar to jump back #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alex3305 opened this issue Oct 21, 2014 · 10 comments
Closed

Update interval causes scrollbar to jump back #34

alex3305 opened this issue Oct 21, 2014 · 10 comments
Assignees

Comments

@alex3305
Copy link
Contributor

I don't know if this is an AngularJS specific issue and can even be fixed, but I notice that when the page refreshes, it goes back to the top of the page. This should be no problem, but can be pretty annoying when you are reading an issue which doesn't fit in a task.

Is there another way of refreshing the notes? Or is it possible to use an Angular plugin to retain the position of the scrollbar? Do you have any ideas about this?

@kiswa
Copy link
Owner

kiswa commented Oct 21, 2014

I've considered it. I think the update method used would have to change throughout, so that instead of getting the JSON objects from the API and overwriting the previous data it would have to make comparisons and update the existing objects in place.

Something I'm thinking about, just not high on my list yet.

@kiswa kiswa added this to the v1.0.0 milestone Oct 21, 2014
@kiswa
Copy link
Owner

kiswa commented Oct 25, 2014

Don't know if you've noticed the commits, but I tested the keepScrollPos directive you added and it didn't work for the way TaskBoard is setup (f1fb197).

I'll either have to store scroll positions before update and set them after an update, or do what I said before where I parse and update in place instead of wholesale replacement.

@kiswa kiswa modified the milestones: v0.3.0, v1.0.0 Oct 28, 2014
@captainwasabi
Copy link

There are some other annoying things that happen when the refresh hits, like when you are dragging an item to another column, it just pops right back to it's original location. (Should this, and what seem to be other refresh issues, be added to this issue or create a new issues for each?)

@kiswa
Copy link
Owner

kiswa commented Nov 2, 2014

I'll try to address all the refresh issues when I work on this issue.

@captainwasabi
Copy link

Another issue is that if I move an item to another column, then immediately edit it, it will jump back to the previous column

@kiswa kiswa modified the milestones: v0.3.0, v0.4.0 Dec 4, 2014
@taikedz
Copy link

taikedz commented Jan 13, 2015

+1 from me. TaskBoard is a great app but the periodic jump is a bane to the workflow...

I'm not much of a developer so trying to wade through someone else's angularjs code is a bit much for me; just wanted to however suggest looking at this thread where it seems some form of workaround has been mooted...

angular-ui/ui-router#110

Dunno if that helps...

@kiswa
Copy link
Owner

kiswa commented Jan 13, 2015

That looks very helpful, thank you!

@kernle32dll
Copy link

+1 from me

@FiSHYsolutions
Copy link

To whom it may concern: it's possible to reduce the refresh-interval in v0.3.1 until this issue is fixed. modify line 143 in boards.js from 10000 to 60000 (or whatever you want) milliseconds:

bash$ diff /var/www/TaskBoard/js/controllers/boards.js*
143c143
<     $scope.boardInterval = $interval($scope.loadBoards, 60000);
---
>     $scope.boardInterval = $interval($scope.loadBoards, 10000);

this will also decrease your pagetraffic significant.

@alex3305
Copy link
Contributor Author

Closed for inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants