diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 0a4a59e4e..49cfde06d 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -183,13 +183,6 @@ bool ChildSession::_handleInput(const char *buffer, int length) } else if (!_isDocLoaded) { - // Be forgiving to these messages while we load. - if (tokens[0] == "useractive" || - tokens[0] == "userinactive") - { - return true; - } - sendTextFrame("error: cmd=" + tokens[0] + " kind=nodocloaded"); return false; } diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 84fddd689..f697c6630 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -1316,6 +1316,12 @@ bool DocumentBroker::forwardToChild(const std::string& viewId, const std::string { assertCorrectThread(); + // Ignore userinactive, useractive message until document is loaded + if (!isLoaded() && (message == "userinactive" || message == "useractive")) + { + return true; + } + LOG_TRC("Forwarding payload to child [" << viewId << "]: " << message); std::string msg = "child-" + viewId + ' ' + message;