pace icon indicating copy to clipboard operation
pace copied to clipboard

How to make the indicator show more consistently on page exit

Open Nexonic opened this issue 9 years ago • 6 comments

I'd like the progress indicator to show when a link is clicked and remain on until the new page appears.

To implement this I've tried: window.onbeforeunload = function(e) { Pace.restart(); };

This turns the indicator on when a link is clicked but it only remains on a couple seconds. Is there a way to make it stay on longer until the new page is loaded?

Nexonic avatar Feb 24 '16 16:02 Nexonic

Have you tried to use pace-options paceOptions={ghostTime: 800}? ghostTime should configure the minimum time the bar or percentage will sit at 100% before disappearing.

thisisfed avatar Feb 25 '16 19:02 thisisfed

Thanks! Seems like this is the right avenue but I don't want to set it on page load or it will remain on too long. I just want it on page exit. I've tried the following code but it doesn't seem to work. Arg... I just want to turn it on and have it stay on! :)

window.onbeforeunload = function(e) { Pace.options = {ghostTime: 2500000}; Pace.restart(); };

Nexonic avatar Feb 25 '16 23:02 Nexonic

We have the same issue pace stops before page unload, that cause confusion to users that might they have not clicked any link yet. Any other solution. ?

IT247PRO avatar Apr 30 '16 17:04 IT247PRO

+1

alessandroraffa avatar Jul 07 '16 09:07 alessandroraffa

+1

ri-gr avatar Jul 09 '16 08:07 ri-gr

+1

natsu90 avatar Dec 12 '18 06:12 natsu90