mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-21 22:54:53 +08:00
prevent Cumulative Layout Shift by fading in elements after initial translation is loaded
This commit is contained in:
@@ -220,7 +220,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');
|
||||
|
||||
Reference in New Issue
Block a user