YUI: DragDrop Proxy - Select Element
This code fixes the issue with dragging a DDProxy over a select element.
The Javascript
(function() { var Dom = YAHOO.util.Dom, Event = YAHOO.util.Event; YAHOO.util.DDProxy.prototype._createFrame = YAHOO.util.DDProxy.prototype.createFrame; YAHOO.util.DDProxy.prototype.createFrame = function() { this._createFrame.apply(this, arguments); var div = this.getDragEl(); if (YAHOO.env.ua.ie) { //Only needed for Internet Explorer var ifr = document.createElement('iframe'); ifr.setAttribute('src', 'javascript:false;'); ifr.setAttribute('scrolling', 'no'); ifr.setAttribute('frameborder', '0'); div.insertBefore(ifr, div.firstChild); YAHOO.util.Dom.setStyle(ifr, 'height', '100%'); YAHOO.util.Dom.setStyle(ifr, 'width', '100%'); YAHOO.util.Dom.setStyle(ifr, 'position', 'absolute'); YAHOO.util.Dom.setStyle(ifr, 'top', '0'); YAHOO.util.Dom.setStyle(ifr, 'left', '0'); YAHOO.util.Dom.setStyle(ifr, 'opacity', '0'); YAHOO.util.Dom.setStyle(ifr, 'zIndex', '-1'); YAHOO.util.Dom.setStyle(ifr.nextSibling, 'zIndex', '2'); } }; (new YAHOO.util.DDProxy('dd')).endDrag = function() { alert(YAHOO.lang.dump(arguments)); }; })();