Last modified: 2014-10-07 21:49:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69385, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67385 - OOjs UI: MenuWidget does not defer label fitting long enough for TextInputMenuWidget when it first opens
OOjs UI: MenuWidget does not defer label fitting long enough for TextInputMen...
Status: ASSIGNED
Product: OOjs UI
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-01 19:29 UTC by Krinkle
Modified: 2014-10-07 21:49 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screen r (1.44 MB, video/quicktime)
2014-08-25 12:19 UTC, Krinkle
Details

Description Krinkle 2014-07-01 19:29:38 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.
Comment 1 Alex Monk 2014-08-05 16:30:03 UTC
If you're not focused on the input field, you shouldn't be seeing suggestions...
Comment 2 Alex Monk 2014-08-23 00:36:00 UTC
Timo, could you clarify what's going on here? It sounds as if you're getting suggestions without having focused on the input field.
Comment 3 Krinkle 2014-08-25 12:18:50 UTC
(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
Comment 4 Krinkle 2014-08-25 12:19:19 UTC
Created attachment 16272 [details]
Screen r
Comment 5 Alex Monk 2014-08-27 01:59:49 UTC
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).
Comment 6 Alex Monk 2014-09-01 18:55:00 UTC
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.
Comment 7 Alex Monk 2014-09-01 20:42:57 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links