yui/yui3 — pull request #1175 by jinty (2013-09-10 10:16:20+00:00)
Title: Widget modality gets confused by cloned masks

Stop widget-modality being confused by multiple masks
If a modal widget and it's mask were cloned by other
code (i.e. a drag/drop proxy) the document could have
multiple masks. This confuses modality, as it uses the
first mask and could reposition it after the second.
Things go downhill from there…

The chosen fix is to keep a reference to the mask
rather than search for it each time. An alternative
would be to search the entire document and delete
extra masks, but I thought that too ugly.