Skip to content

Commit 643ec1a

Browse files
committed
Improving test case for #28
1 parent a8ba745 commit 643ec1a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/org/vaadin/tinymce/PreserveOnRefreshBug27.java

+6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package org.vaadin.tinymce;
22

3+
import com.vaadin.flow.component.Key;
4+
import com.vaadin.flow.component.KeyModifier;
35
import com.vaadin.flow.component.button.Button;
46
import com.vaadin.flow.component.dialog.Dialog;
57
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
68
import com.vaadin.flow.router.PreserveOnRefresh;
79
import com.vaadin.flow.router.Route;
10+
import org.vaadin.firitin.components.button.VButton;
811

912
@Route
1013
@PreserveOnRefresh
@@ -18,6 +21,9 @@ public PreserveOnRefreshBug27() {
1821
tinyMce.setValue("<h2>Hallo Leute,</h2>");
1922
dialog.add(tinyMce);
2023
dialog.add(new Button("Cancel", e -> dialog.close()));
24+
VButton button = new VButton("Focus (CTRL-I)", e -> tinyMce.focus());
25+
button.addClickShortcut(Key.of("i"), KeyModifier.CONTROL);
26+
dialog.add(button);
2127
Button open = new Button("Open", e -> dialog.open());
2228
Button enable = new Button("Disable");
2329
enable.addClickListener(e -> {

0 commit comments

Comments
 (0)