jcouyang / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog.ui.PopupMenu 'attach' method confusing parameter handling #542

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Expected steps to produce an un-anchored context menu.

var pm = new goog.ui.PopupMenu(); 
pm.attach(goog.dom.getElement('foo'), null, null, true);

The resulting popup is anchored.

To create an un-anchored context menu I have to attach using 'undefined' params.

pm.attach(goog.dom.getElement('foo'), undefined, undefined, true);

This could easily cause a hair pulling moment.

Regards,
Ali.

Original issue reported on code.google.com by ali.taf...@googlemail.com on 26 Feb 2013 at 4:53