TextField value not available in KeyUp listener
See original GitHub issuetextField.addKeyUpListener("Enter", e -> {
System.out.println("Committed "+textField.getValue());
});
Expected result after typing 123
and pressing enter:
“Committed 123”
Actual result: "Committed "
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
input value not responding to "keyup" event - Stack Overflow
I am having problem with the following code. It is a simple To Do app with Javascript. Following a tutorial, followed to the...
Read more >Element: keyup event - Web APIs | MDN
Returns a string with the code value of the physical key represented by the event. Warning: This ignores the user's keyboard layout, so...
Read more >Javascript Keydown & Keyup Event to Get Value ... - YouTube
Javascript Keydown & Keyup Event to Get Value on Keypress in Textbox Example in Browser [LIVE CODE]. Watch later. Share. Copy link.
Read more >.keypress() | jQuery API Documentation
Description: Bind an event handler to the "keypress" JavaScript event, or trigger that event on an ... <input id="target" type="text" value="Hello there">.
Read more >I can't catch the JavaScript keyup event of the Input element ...
The browser's console window should be showing you errors for these. ... In this case, the program does not enter in the keyup...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note that pressing <kbd>ENTER</kbd> will fire a
change
event, but the input won’t blur.That said, I don’t totally agree considering this an anti-pattern: pressing the <kbd>ENTER</kbd> key is a common user action to confirm their input, as in “I’m done, let’s go ahead” (in HTML native forms, pressing <kbd>ENTER</kbd> will fire a
submit
event and trigger a GET/POST request, as a shortcut of pressing the submit button). This can’t be related to achange
event of single input fields, which will fire whenever an input blurs.In Flow, if the developer wants to mimic this behavior of native form at the moment needs to explicitly add a
keyup
listener for <kbd>ENTER</kbd> to all related inputs: it would be useful to be able to attach the listener to theBinder
, or theFormLayout
or the generic container component of the form fields.I agree with this, but that is another enhancement issue to make.
KeyUpListener
is not at the moment really meant for this.