Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ComboBoxCursorPositionReset.java 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.vaadin.tests.components.combobox;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractReindeerTestUI;
  4. import com.vaadin.ui.ComboBox;
  5. import com.vaadin.ui.HorizontalLayout;
  6. import com.vaadin.ui.Label;
  7. public class ComboBoxCursorPositionReset extends AbstractReindeerTestUI {
  8. @Override
  9. protected void setup(VaadinRequest request) {
  10. final HorizontalLayout root = new HorizontalLayout();
  11. root.setSizeFull();
  12. setContent(root);
  13. ComboBox<String> combo = new ComboBox<>();
  14. root.addComponent(combo);
  15. combo.setItems("Hello World", "Please click on the text");
  16. combo.setValue("Please click on the text");
  17. Label gap = new Label();
  18. root.addComponent(gap);
  19. root.setExpandRatio(gap, 1);
  20. }
  21. @Override
  22. protected String getTestDescription() {
  23. return "Clicking on the text in the ComboBox should position the caret where you clicked, not cause it to jump to the start or the end";
  24. }
  25. @Override
  26. protected Integer getTicketNumber() {
  27. return 11152;
  28. }
  29. }