I noticed that the issue was just on a TextField and I realized that the method "focus" strangely makes the style disappear.
Here is an example:
TextField tf = new TextField();
tf.setInputPrompt(inputPrompt);
tf.setWidth(width, Sizeable.UNITS_PIXELS);
tf.addStyleName("textfield-roundleft");
tf.focus(); // Makes the style disappear!
The solution I found is to remove the method call tf.focus();
Note: the context was a Liferay Portlet with Vaadin, I can't say if it happens in a normal web application too.
No comments:
Post a Comment