Last modified: 2014-10-07 21:49:28 UTC
Steps: 1. Create page with VE 2. Insert New Template 3. Paste a piece of text that is the prefix of one or more pages with template data Expected result: Suggestions show up as: - Foo very...long bar - Foo very...long foo - Foo very...long x Actual result: Suggestions show up as - Foo very simple page with... - Foo very simple page with... - Foo very simple page with... Until you click in the input field to focus it (even though it is already focussed), at which point they snap to the middle ellipsis.
If you're not focused on the input field, you shouldn't be seeing suggestions...
Timo, could you clarify what's going on here? It sounds as if you're getting suggestions without having focused on the input field.
(In reply to Alex Monk from comment #2) > Timo, could you clarify what's going on here? It sounds as if you're getting > suggestions without having focused on the input field. The input field is focussed by default when opening the dialog from "Insert -> New template". Screen capture: http://cl.ly/3s1k1e2G1j0f
Created attachment 16272 [details] Screen r
The ellipsis in the middle is done by the call to this.$label.autoEllipsis in OO.ui.LabelledElement#fitLabel - where it seems the first call has no effect, but later calls add the ellipsis in the middle as you would expect. This sounds like it could be a jquery.autoEllipsis bug... The suffix ellipsis is added by text-overflow:ellipsis; when the text is still too long (no proper autoEllipsis has been performed).
It looks like when the autoEllipsis call is initially run, the menu is actually showing at the top left of the window, and is as wide as it's largest option is. But the second time it's run, this has been fixed, so autoEllipsis actually has something to do.
MenuWidget#addItems already defers fitting labels until the menu is visible, but it's not quite enough in this case, because we need to do it after it's visible -and positioned-, which is the responsibility of TextInputMenuWidget. Trevor?