Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1595

AutoCompleteTextField: Scrolling down the Choice Menu Only When the Bottom of the Menu Is Reached

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.3
    • 1.3.4, 1.4-M2
    • wicket-extensions
    • None

    Description

      Currently, the AutoCompleteTextField will scroll the selected item to the top of the choice menu by the following code in the render method:

      if(selected==i) {
      classNames.push('selected');
      node.scrollIntoView(true);
      }

      However, I think it should be more user-friendly if the choice menu is only scrolled down for one-item when the bottom of the current menu is reached. Please refer to: http://www.dhtmlgoodies.com/scripts/ajax-dynamic-list/ajax-dynamic-list.html.

      This can be implemented by the following modification:

      if(selected==i) {
      classNames.push('selected');
      if (node.offsetTop >= element.offsetHeight)

      { element.scrollTop = node.offsetTop - element.offsetHeight + node.offsetHeight + 2 ; }

      if (node.offsetTop < element.offsetHeight)

      { element.scrollTop = 0; }

      }
      }

      Hope this feature can be added.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andychu Andy Chu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: