Title doesn't update unless tab is active, so in effect, unless you activate a new tab, its title also won't update (#283)
To reproduce: Open CodeSandbox render in new window, stay on the tab to watch the time (seconds) update, then switch to any other tab and it freezes until you reactivate the tab. Same behaviour if you move away from the new tab before it loads (assuming connection is slow), what you'll have as page title is the default "TITLE".
https://codesandbox.io/s/xv0rv8l4nz
_Browser: Chrome 71.0.3578.80 (64-bit) Linux_
The behaviour on Firefox _Quantum 64.0.2 (64-bit) Linux_ is quite weird, update is triggered by hovering and unhovering on the inactive tab, after which the update slows down exponentially, starting from 1 second.
It seems that rAF is completely disabled for inactive tabs in Chrome, probably the only fix for that is to always use timers and not rAF. Firefox indeed does update but with varying intervals
@manniL I have updated the vue-router examples to include a time in the title so you can easily check this behaviour as well.
I'm having this bug too, is there any work around until is fixed?
@focux There is a partial fix in the release candidate for v2. Eg I dont think using rAF actually holds that much more value over timers as we can probably have the same effect by debouncing the update to 1/60 seconds.
So maybe we can just remove rAF and use timers as said, although there might be other issues? We could add an extra plugin option so you can prefer timers over rAF?
@pimlie Dropping rAF might be worth a try :relaxed:
I have dropped using rAF and instead use a simple clear/setTimeout with a 10ms interval. Should be reasonable. Will be available in rc.1 which I will probably release later today
Most helpful comment
I have dropped using rAF and instead use a simple clear/setTimeout with a 10ms interval. Should be reasonable. Will be available in
rc.1which I will probably release later today