Community
Participate
Working Groups
When there are many completions proposed by the content assist feature, the window displaying the proposals becomes very long. It should have a maximum height defined and should display a vertical scrollbar if needed. Also currently the window can be displayed outside of the visible part of the web page (e.g. when invoking the content assistance for a code being placed near the bottom of the browser's window, in which case the website will be stretched vertically.
Very good point, right now we're not handling any of these edge cases, but should.
I've prepared a patch with some improvement to this issue. I tried to make the content assist panel to behave similar to the one from the Eclipse Platform. The size of the panel is constant (height 150px), with scrollbars being displayed all the time. The current element can be selected using arrow keys (as before, but now the window scrolls as needed). The panel will be displayed above the caret if not enough space left below it. Also it won't cross the right edge of the viewport.
Created attachment 200525 [details] A patch for improving the content assist panel
(In reply to comment #3) Thanks for the patch. Can I get you to confirm that you all the code and that you have the rights to contribute it under the eclipse.org website terms of use? I will make a few changes to it.
I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d5de44b5e5c07d371d2e59ac3726e11d3ef68848 Differences from the patch: - Only show the horizontal scrollbar when necessary - Avoid dojo.window.getBox(), for the sake of not adding more dojo dependencies than we already have - Use clientHeight of contentAssistPanel for one calculation rather than offsetHeight, so we don't have to deal with the horizontal scrollbar height Thanks again!