Skip to content

Commit 1e6c2c0

Browse files
committed
Make detaching listener happen all the time in finishOperation
1 parent 809f48c commit 1e6c2c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/js/src/manager/screen/choiceset/_PreloadPresentChoicesOperation.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,9 @@ class _PreloadPresentChoicesOperation extends _Task {
703703
this._completionListener(this._loadedCells, success);
704704
}
705705

706+
// detach the OnKeyboardInput listener at the end
707+
this._lifecycleManager.removeRpcListener(FunctionID.OnKeyboardInput, this._keyboardRpcListener);
708+
706709
if (this._lifecycleManager === null) {
707710
console.error('PresentChoiceSetOperation: LifecycleManager is null');
708711
this._currentState = _PreloadPresentChoicesOperationState.FINISHING;
@@ -716,8 +719,6 @@ class _PreloadPresentChoicesOperation extends _Task {
716719
const setGlobalProperties = new SetGlobalProperties()
717720
.setKeyboardProperties(this._originalKeyboardProperties);
718721

719-
// detach the OnKeyboardInput listener at the end
720-
this._lifecycleManager.removeRpcListener(FunctionID.OnKeyboardInput, this._keyboardRpcListener);
721722
const response = await this._lifecycleManager.sendRpcResolve(setGlobalProperties);
722723

723724
if (response.getSuccess()) {

0 commit comments

Comments
 (0)