fix: do not fire pause logic on window focus/blur event
This commit is contained in:
parent
addf9d71fa
commit
52254bca7c
@ -334,6 +334,7 @@ class Collab extends PureComponent<Props, CollabState> {
|
||||
if (this.portal.socket) {
|
||||
this.reportActive();
|
||||
this.portal.socket.connect();
|
||||
this.portal.socketInitialized = true;
|
||||
this.setIsCollaborationPaused(false);
|
||||
|
||||
if (callback) {
|
||||
|
@ -476,7 +476,9 @@ const ExcalidrawWrapper = () => {
|
||||
event.type === EVENT.FOCUS
|
||||
) {
|
||||
syncData();
|
||||
}
|
||||
|
||||
if (event.type === EVENT.VISIBILITY_CHANGE) {
|
||||
switch (true) {
|
||||
// user switches to another tab
|
||||
case document.hidden && collabAPI.isCollaborating():
|
||||
|
Loading…
x
Reference in New Issue
Block a user