forms MDL-22487 Fixed resizing bug in smart select

This commit is contained in:
Sam Hemelryk 2010-05-18 08:11:12 +00:00
parent d7768a692a
commit 32690ac23c

View File

@ -1659,6 +1659,12 @@ M.form.init_smartselect = function(Y, id, options) {
pos[0] += 1;
this.nodes.menu.setXY(pos);
this.nodes.menu.on('click', this.handle_click, this);
Y.one(window).on('resize', function(){
var pos = this.nodes.select.getXY();
pos[0] += 1;
this.nodes.menu.setXY(pos);
}, this);
},
generate_menu_content : function() {
var content = '<div id="'+this.id+'_smart_select" class="smartselect">';