angular-loading-bar icon indicating copy to clipboard operation
angular-loading-bar copied to clipboard

Prevent loading bar from moving backwards

Open mcoetzee opened this issue 9 years ago • 7 comments

Following from pull request #119 - this solution seems to work nicely (and caters for the scenario you explained in the PR-119).

Another thing to note is that I fixed the issue where the loading-bar gets removed from the DOM before it has the chance to move through to 100% width.

Lastly (and importantly) - I can't get the unit tests to pass with this change. The 'leave' method of animate returns nothing on line 234 which prevents the status to be set back to 0 (via the '_completeAnimation' function). Could you please assist in getting these tests to run!

mcoetzee avatar Dec 29 '14 11:12 mcoetzee

Really appreciate the work here! I noticed, however, that subsequent requests end up freezing the loading bar (it no longer ticks randomly). Are you seeing that as well?

chieffancypants avatar Jan 05 '15 19:01 chieffancypants

Likewise - this is a rad library so I'm happy to help. Hmm... so my test case is the following:

  1. I fire off one request (1s response time)
  2. On completion of request I immediately fire off another one (3s response time)

Result: the bar no longer moves backwards but instead carries on moving forwards and finally to 100% when the request returns. FYI I then test distinct requests, which triggers the loading bar to move forward as expected to 100%.

Ok so I'm not getting this freezing behaviour you are experiencing. I'm on Mac testing in Chrome, Firefox and Safari. How exactly are you getting this unwanted freezing behaviour?

mcoetzee avatar Jan 05 '15 19:01 mcoetzee

+1

groteck avatar Mar 25 '15 18:03 groteck

+1

bluesliverx avatar Nov 16 '15 17:11 bluesliverx

+1 @mcoetzee Loading bar doesn't move backward but transition which was fading out loading bar seems to doesn't work with this code. Do you have the same behaviour?

kierzniak avatar Dec 07 '15 14:12 kierzniak

+1 ...

EmmanuelPREVOST avatar Apr 18 '16 12:04 EmmanuelPREVOST

+1

Code works perfectly for me.

ryankc33 avatar Jul 12 '16 06:07 ryankc33