AutoCompleteTextField: Scrolling down the Choice Menu Only When the Bottom of
the Menu Is Reached
-------------------------------------------------------------------------------------------------
Key: WICKET-1595
URL: https://issues.apache.org/jira/browse/WICKET-1595
Project: Wicket
Issue Type: Improvement
Components: wicket-extensions
Affects Versions: 1.3.3
Reporter: Andy Chu
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.