From 0c0b0b200e1178eaddb2280a41628cb01546a906 Mon Sep 17 00:00:00 2001 From: Miroslav Pokorny Date: Wed, 15 Jan 2025 21:01:06 +1100 Subject: [PATCH] SpreadsheetTextBox.enterFiresValueChange refactor --- .../spreadsheet/dominokit/value/SpreadsheetTextBox.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/walkingkooka/spreadsheet/dominokit/value/SpreadsheetTextBox.java b/src/main/java/walkingkooka/spreadsheet/dominokit/value/SpreadsheetTextBox.java index 099850bd2..5ef203b3c 100644 --- a/src/main/java/walkingkooka/spreadsheet/dominokit/value/SpreadsheetTextBox.java +++ b/src/main/java/walkingkooka/spreadsheet/dominokit/value/SpreadsheetTextBox.java @@ -132,10 +132,7 @@ public SpreadsheetTextBox focus() { } public SpreadsheetTextBox enterFiresValueChange() { - final TextBox textBox = this.textBox; - - textBox.addEventListener( - EventType.keydown.getName(), + return this.addKeydownListener( (final Event event) -> { final KeyboardEvent keyboardEvent = Js.cast(event); switch (Key.fromEvent(keyboardEvent)) { @@ -152,7 +149,6 @@ public SpreadsheetTextBox enterFiresValueChange() { } } ); - return this; } public SpreadsheetTextBox magnifyingGlassIcon() {