Hello,
i encountered a wird offset issue when the component is used on a scrollable container when scrolled. The same issue occurs when it is used on a UI with the style ValoTheme.UI_WITH_MENU like it is used in the Vaadin Quick Tickets Demo. Please consider the following example:
`
@theme("mytheme")
public class MyUI extends UI {
@Override
protected void init(VaadinRequest vaadinRequest) {
Panel p = new Panel("Test");
p.setSizeFull();
VerticalLayout vl = new VerticalLayout();
vl.setWidth(100, Unit.PERCENTAGE);
vl.setMargin(true);
vl.setSpacing(true);
Label l = new Label();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 200; i++)
sb.append("Some pretty long text here... ");
l.setValue(sb.toString());
l.setWidth(100, Unit.PERCENTAGE);
vl.addComponent(l);
AbstractCarousel carousel = new VerticalCarousel();
carousel.setWidth(100, Unit.PERCENTAGE);
for (int i = 0; i < 10; i++)
carousel.addComponent(new Button("B" + i));
vl.addComponent(carousel);
p.setContent(vl);
setContent(p);
}
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
@VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
public static class MyUIServlet extends VaadinServlet {
}
}
`
If the carousel is scrolled in view, the offset (matching the scrollbars distance from the top or from the left in case of a HorizontalCarousel / Horizontal scrollbar) occurs. The offset can be "varied" by shortening, lengthen the string
Can something be done to circumvent this issue?
Thanks
Thomas
Hello,
i encountered a wird offset issue when the component is used on a scrollable container when scrolled. The same issue occurs when it is used on a UI with the style ValoTheme.UI_WITH_MENU like it is used in the Vaadin Quick Tickets Demo. Please consider the following example:
`
@theme("mytheme")
public class MyUI extends UI {
}
`
If the carousel is scrolled in view, the offset (matching the scrollbars distance from the top or from the left in case of a HorizontalCarousel / Horizontal scrollbar) occurs. The offset can be "varied" by shortening, lengthen the string
Can something be done to circumvent this issue?
Thanks
Thomas