_makeDraggable: function() {
var self = this,
options = self.options,
+ doc = $(document),
heightBeforeDrag;
self.uiDialog.draggable({
drag: function(event) {
self._trigger('drag', event);
},
- stop: function(event) {
+ stop: function(event, ui) {
+ options.position = [ui.position.left - doc.scrollLeft(),
+ ui.position.top - doc.scrollTop()];
$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
self._trigger('dragStop', event);
$.ui.dialog.overlay.resize();