yui/yui3 — pull request #1517 by juandopazo (2013-12-23 14:04:35+00:00)
Title: [widget-modality] Focus after a timeout

When showing a hidden Panel, WidgetModality calls `_focus` but this happens before WidgetPositionAlign repositioned the panel. This causes the widget to be focused in an incorrect position (sometimes at the top of the page) and forces the page to scroll in certain situations.

This is definitely a patch. It makes sense that WidgetModality waits until a next turn to call `focus` because other mixins/components may be doing a lot of things to the position a styles of the widget using Modality, but on the other hand it's hard to test and looks hacky. I'm looking for a better solution and feedback.