Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid Shift-range selection broken when SC.setScreenReaderMode(true) (14.1p)

    Dear Admin,

    Environment
    • SmartGWT 14.1p
    • GWT 2.12.2, Java 17
    • Browser: Chrome (latest) on Windows 11
    When SC.setScreenReaderMode(true) is enabled, TreeGrid multiple selection via Shift+click no longer works. (inifnite loop)
    Same code behaves correctly when screenReaderMode is not enabled.

    Here is a test code:

    public class TreeShiftBugEntryPoint implements EntryPoint {

    public static class EmployeeTreeNode extends TreeNode {
    public EmployeeTreeNode(String employeeId,
    String reportsTo,
    String name,
    String job,
    boolean isOpen) {
    setAttribute("EmployeeId", employeeId);
    setAttribute("ReportsTo", reportsTo);
    setAttribute("Name", name);
    setAttribute("Job", job);
    setAttribute("isOpen", isOpen);
    }
    }

    private static final TreeNode[] employeeData = new TreeNode[] {
    new EmployeeTreeNode("4", "1", "Charles Madigen", "COO", true),
    new EmployeeTreeNode("188", "4", "Rogine Leger", "Mgr", true),
    new EmployeeTreeNode("189", "4", "Gene Porter", "Mgr", false),
    new EmployeeTreeNode("265", "189","Olivier Doucet", "Spec", false),
    new EmployeeTreeNode("264", "189","Cheryl Pearson", "Rep", false)
    };

    @Override
    public void onModuleLoad() {
    // Enabling this breaks Shift-range selection in TreeGrid
    SC.setScreenReaderMode(true);

    Tree tree = new Tree();
    tree.setModelType(TreeModelType.PARENT);
    tree.setRootValue(1);
    tree.setIdField("EmployeeId");
    tree.setParentIdField("ReportsTo");
    tree.setOpenProperty("isOpen");
    tree.setData(employeeData);

    TreeGrid grid = new TreeGrid();
    grid.setFields(new ListGridField("Name", "Employee"));
    grid.setCanFocus(true);
    grid.setSelectionType(SelectionStyle.MULTIPLE);
    grid.setSelectionAppearance(SelectionAppearance.ROW_STYLE);
    grid.setShowSelectedStyle(true);
    grid.setShowPartialSelection(false);
    grid.setCascadeSelection(false);
    grid.setData(tree);

    HLayout layout = new HLayout();
    layout.setWidth100();
    layout.setHeight100();
    layout.addMember(grid);
    layout.draw();
    }
    }

    Steps
    1. Run the module above.
    2. Click row 1 (select).
    3. Shift+click row 4.

    Expected: rows 1–4 are selected (standard range selection).
    Actual: only the second row click is selected; range selection does not occur. (Infinite loop)

    Best,
    Shahram...


    #2
    This was literally just reported hours ago.

    If that was also you (or your organization) please be aware that an intentional duplicate report will get you immediately perma-banned.

    If that's not what's happened here, just watch the original thread.

    Comment


      #3
      Dear Admin,
      It was not anyone from our organization and myself, thanks for the link and sorry for sending a duplicate.

      Best,
      Shahram...

      Comment

      Working...
      X