atePropagation(); } // Currently, even if we set Document.KEYPRESS_EVENT_MODEL_CONFLATED // here, conflated model isn't used forcibly. If you need it, you need // to change WidgetKeyboardEvent, dom::KeyboardEvent and PresShell. let model = Document.KEYPRESS_EVENT_MODEL_DEFAULT; if ( this._isOldOfficeOnlineServer(aEvent.target) || this._isOldConfluence(aEvent.target.ownerGlobal) ) { model = Document.KEYPRESS_EVENT_MODEL_SPLIT; } aEvent.target.setKeyPressEventModel(model); } _isOldOfficeOnlineServer(aDocument) { let editingElement = aDocument.getElementById( "WACViewPanel_EditingElement" ); // If it's not Office Online Server, don't include it into the telemetry // because we just need to collect percentage of old version in all loaded // Office Online Server instances. if (!editingElement) { return false; } let isOldVersion = !editingElement.classList.contains( "WACViewPanel_DisableLegacyKeyCodeAndCharCode" ); return isOldVersion; } _isOldConfluence(aWindow) { if (!aWindow) { return false; } // aWindow should be an editor window in