-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
A custom key listener is two-fold: there is a CustomKey DOM-event listener, and a client-side registration that filters which keys dispatch an event.
XTermConsoleAddon/src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java
Lines 275 to 276 in 465899e
| Registration r = getElement().addEventListener("CustomKey", listener).setFilter(filter); | |
| executeJs("this.registerCustomKeyListener($0)", json); |
The CustomKey event listener is added through Element API (so it is preserved after on reattach). However, the client side part (registerCustomKeyListener, etc) is added through JavaScript, and will be lost.
Expected behavior
Custom key listeners should after reattach.
Minimal reproducible example
@PreserveOnRefresh
public class ConsoleView extends Div {{
XTerm xterm = new XTerm();
TerminalHistory.extend(xterm);
add(xterm);
}}
- Navigate to the view
- Write stuff and check that history works
- Press F5
- Check that history does not work
Add-on Version
3.0.0
Vaadin Version
24.4.6
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
To Do