| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Hack to not show menu immediately upon meta dialog opening for redirect change | mediawiki/extensions/VisualEditor | master | +15 -1 |
Details
Event Timeline
For some reason I thought I had uploaded already.
(Note: To reproduce this your redirect must be to a page that exists or returns search results, and must already have focused something like the VE surface)
What seems to be going on here is mw.widgets.TitleInputWidget.prototype.focus disabling lookups in LookupElement, then having InputWidget (via TextInputWidget) call this.$input[0].focus(), and reenabling lookups.
Except the actual focus (and hence the event being sent causing OO.ui.mixin.LookupElement.prototype.onLookupInputFocus/populateLookupMenu to be called) appears to happen not during the HTMLInputElement#focus call but after it, when lookups have been reenabled. Probably due to the dialog not having opened yet.
So sticking MWSettingsDialog's focus call inside a setTimeout works by deferring it until after the dialog has opened?
Change 294359 had a related patch set uploaded (by Alex Monk):
Hack to not show menu immediately upon meta dialog opening for redirect change
Change 294359 merged by jenkins-bot:
Hack to not show menu immediately upon meta dialog opening for redirect change