Skip to content

Commit

Permalink
0004943: Replaced setSelection() in PromptDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-miller-jumpmind committed Aug 13, 2021
1 parent d410f42 commit 4f442f0
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -25,6 +25,7 @@
import java.io.Serializable;

import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.UI;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.button.ButtonVariant;
import com.vaadin.flow.component.dialog.Dialog;
Expand Down Expand Up @@ -66,7 +67,7 @@ public PromptDialog(String caption, String text, String defaultValue,
field.setWidthFull();
field.setValue(defaultValue);
if (defaultValue != null) {
//field.setSelection(0, defaultValue.length());
UI.getCurrent().getPage().executeJs("$0.select();", field.getElement());
field.focus();
}
layout.add(field);
Expand Down

0 comments on commit 4f442f0

Please sign in to comment.