Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@PreserveOnRefresh does not retain button click shortcuts #8247

Closed
alejandro-du opened this issue May 5, 2020 · 1 comment · Fixed by #8391
Closed

@PreserveOnRefresh does not retain button click shortcuts #8247

alejandro-du opened this issue May 5, 2020 · 1 comment · Fixed by #8391

Comments

@alejandro-du
Copy link
Contributor

Description of the bug

@PreserveOnRefresh doesn't retain button click shortcuts after browser refresh.

Minimal reproducible example

@Route
@PreserveOnRefresh
public class MainView extends Div {

    public MainView() {
        Button button = new Button("Press ENTER, reload the page, and press ENTER again",
                event -> Notification.show("Thanks"));
        button.addClickShortcut(Key.ENTER);
        add(button);
    }

}

Expected behavior

Click shortcuts work after a browser refresh.

Actual behavior

Click shortcuts don't work after a browser refresh.

Versions:

- Vaadin / Flow version: Vaadin 14.1.27
- Java version: openjdk 11.0.6 2020-01-14
- OS version: MacOS 10.15.4
- Browser version (if applicable):
- Application Server (if applicable):
- IDE (if applicable):

See also #6357.

@denis-anisimov
Copy link
Contributor

Confirmed.
Thank you very much for the short and exact steps to reproduce.

@pleku pleku moved this from Internal Backlog / Technical Debt to WIP in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) May 18, 2020
denis-anisimov pushed a commit that referenced this issue May 20, 2020
OLD Vaadin Flow bugs & maintenance (Vaadin 10+) automation moved this from WIP to Closed May 25, 2020
denis-anisimov pushed a commit that referenced this issue May 28, 2020
(#8391)

Fixes #8247
# Conflicts:
#	flow-server/src/test/java/com/vaadin/flow/component/ShortcutRegistrationTest.java
@denis-anisimov denis-anisimov added this to the 2.2 milestone Jun 4, 2020
joheriks pushed a commit that referenced this issue Jun 4, 2020
(#8391)

Fixes #8247
# Conflicts:
#	flow-server/src/test/java/com/vaadin/flow/component/ShortcutRegistrationTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment