Skip to content

Commit

Permalink
Improving test case for #28
Browse files Browse the repository at this point in the history
  • Loading branch information
mstahv committed Feb 1, 2024
1 parent a8ba745 commit 643ec1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/org/vaadin/tinymce/PreserveOnRefreshBug27.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package org.vaadin.tinymce;

import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.KeyModifier;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.dialog.Dialog;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.PreserveOnRefresh;
import com.vaadin.flow.router.Route;
import org.vaadin.firitin.components.button.VButton;

@Route
@PreserveOnRefresh
Expand All @@ -18,6 +21,9 @@ public PreserveOnRefreshBug27() {
tinyMce.setValue("<h2>Hallo Leute,</h2>");
dialog.add(tinyMce);
dialog.add(new Button("Cancel", e -> dialog.close()));
VButton button = new VButton("Focus (CTRL-I)", e -> tinyMce.focus());
button.addClickShortcut(Key.of("i"), KeyModifier.CONTROL);
dialog.add(button);
Button open = new Button("Open", e -> dialog.open());
Button enable = new Button("Disable");
enable.addClickListener(e -> {
Expand Down

0 comments on commit 643ec1a

Please sign in to comment.