assets/js/romo/modal.js in romo-0.20.0 vs assets/js/romo/modal.js in romo-0.20.1
- old
+ new
@@ -111,13 +111,11 @@
RomoModal.prototype._bindPopup = function() {
this.popupElem = Romo.elems('<div class="romo-modal-popup"><div class="romo-modal-body"></div></div>')[0];
var popupParentElem = Romo.closest(this.elem, Romo.data(this.elem, 'romo-dropdown-append-to-closest') || 'body');
Romo.append(popupParentElem, this.popupElem)
- this.bodyElem = Romo.children(this.popupElem).find(Romo.proxy(function(childElem){
- return Romo.is(childElem, '.romo-modal-body');
- }, this));
+ this.bodyElem = Romo.children(this.popupElem, '.romo-modal-body')[0];
if (Romo.data(this.elem, 'romo-modal-style-class') !== undefined) {
Romo.addClass(this.bodyElem, Romo.data(this.elem, 'romo-modal-style-class'));
}
this.contentElem = undefined;
@@ -228,11 +226,11 @@
Romo.addClass(this.dragElems, 'romo-modal-grabbing');
Romo.removeClass(this.dragElems, 'romo-modal-grab');
Romo.popupStack.closeTo(this.popupElem);
- Romo.setStyle(this.popupElem, 'width', Romo.css(this.popupElem, 'width'));
- Romo.setStyle(this.popupElem, 'height', Romo.css(this.popupElem, 'height'));
+ Romo.setStyle(this.popupElem, 'width', Romo.width(this.popupElem)+'px');
+ Romo.setStyle(this.popupElem, 'height', Romo.height(this.popupElem)+'px');
this._dragDiffX = e.clientX - this.popupElem.offsetLeft;
this._dragDiffY = e.clientY - this.popupElem.offsetTop;
Romo.on(window, 'mousemove', Romo.proxy(this._onMouseMove, this));
Romo.on(window, 'mouseup', Romo.proxy(this._onMouseUp, this));