blob: f11f533a0362c3d7bf2e89385e7ca296920a14a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package com.vaadin.tests.components.textfield;
import com.vaadin.tests.components.TestBase;
import com.vaadin.v7.ui.TextField;
public class TextFieldMaxLengthRemovedFromDOM extends TestBase {
@Override
protected void setup() {
final TextField tf = new TextField();
tf.setMaxLength(11);
tf.setRequired(true);
tf.setImmediate(true);
addComponent(tf);
tf.addFocusListener(event -> {
// Resetting Max length should not remove maxlength attribute
tf.setMaxLength(11);
});
}
@Override
protected String getDescription() {
return "Maxlength attribute should not dissappear from the DOM when I focus the text field.";
}
@Override
protected Integer getTicketNumber() {
return 9940;
}
}
|