You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComboBoxInPopupView.java 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. package com.vaadin.tests.components.combobox;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.PopupView;
  4. import com.vaadin.v7.ui.ComboBox;
  5. public class ComboBoxInPopupView extends TestBase {
  6. @Override
  7. protected Integer getTicketNumber() {
  8. return 2508;
  9. }
  10. @Override
  11. protected String getDescription() {
  12. return "Testcase for ComboBox in PopupView. Make the window narrower than the popup: the focused (2) one wraps button to second row AND seems narrower than (1), the unfocused one (1) works as expected.";
  13. }
  14. @Override
  15. protected void setup() {
  16. final ComboBox cb1 = new ComboBox();
  17. cb1.setWidth("260px");
  18. // cb.focus();
  19. PopupView pv1 = new PopupView("<u>1. expected (click)</u>", cb1);
  20. getLayout().addComponent(pv1);
  21. final ComboBox cb2 = new ComboBox();
  22. cb2.setWidth("260px");
  23. PopupView pv2 = new PopupView("<u>2. focused (click)</u>", cb2);
  24. pv2.addPopupVisibilityListener(event -> cb2.focus());
  25. getLayout().addComponent(pv2);
  26. }
  27. }