mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
prevent Cumulative Layout Shift by fading in elements after initial translation is loaded
This commit is contained in:
parent
faa2030f0b
commit
3c1ef57740
6 changed files with 103 additions and 25 deletions
|
@ -231,7 +231,9 @@ class ServerConnection {
|
|||
|
||||
_onDisconnect() {
|
||||
console.log('WS: server disconnected');
|
||||
Events.fire('notify-user', Localization.getTranslation("notifications.connecting"));
|
||||
setTimeout(() => {
|
||||
Events.fire('notify-user', Localization.getTranslation("notifications.connecting"));
|
||||
}, 100); //delay for 100ms to prevent flickering on page reload
|
||||
clearTimeout(this._reconnectTimer);
|
||||
this._reconnectTimer = setTimeout(_ => this._connect(), 1000);
|
||||
Events.fire('ws-disconnected');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue