From b0beb3627d3fdb73ee24a96b7e68e0c3cebe3823 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Mon, 15 Apr 2024 20:27:10 -0600 Subject: [PATCH] interruptSubtreeInput when resetAllButton is pressed, https://github.com/phetsims/graphing-lines/issues/156 --- js/common/view/LineFormsScreenView.ts | 1 + js/linegame/view/SettingsNode.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/common/view/LineFormsScreenView.ts b/js/common/view/LineFormsScreenView.ts index 76409dc8..8a8e11ad 100644 --- a/js/common/view/LineFormsScreenView.ts +++ b/js/common/view/LineFormsScreenView.ts @@ -51,6 +51,7 @@ export default class LineFormsScreenView extends ScreenView { // Reset All button, at bottom-right const resetAllButton = new ResetAllButton( { listener: () => { + this.interruptSubtreeInput(); model.reset(); viewProperties.reset(); }, diff --git a/js/linegame/view/SettingsNode.ts b/js/linegame/view/SettingsNode.ts index ead67fb3..7f4d676b 100644 --- a/js/linegame/view/SettingsNode.ts +++ b/js/linegame/view/SettingsNode.ts @@ -64,7 +64,10 @@ export default class SettingsNode extends Node { // Reset All button, at rightBottom const resetAllButton = new ResetAllButton( { - listener: () => model.reset(), + listener: () => { + this.interruptSubtreeInput(); + model.reset(); + }, scale: GLConstants.RESET_ALL_BUTTON_SCALE, right: layoutBounds.width - GLConstants.SCREEN_X_MARGIN, bottom: layoutBounds.height - GLConstants.SCREEN_Y_MARGIN