Skip to content

Commit 1088371

Browse files
authored
Merge pull request #5 from ivanov/draggable-dialog
drag modal dialogs by the header only
2 parents 3d7f0f2 + 74ac1c0 commit 1088371

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

notebook/static/base/js/dialog.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ define(function(require) {
5656
$("<div/>")
5757
.addClass("modal-header")
5858
.mousedown(function() {
59-
$(".modal").draggable();
59+
$(".modal").draggable({handle: '.modal-header'});
6060
})
6161
.append($("<button>")
6262
.attr("type", "button")
@@ -72,9 +72,6 @@ define(function(require) {
7272
).append(
7373
$("<div/>")
7474
.addClass("modal-body")
75-
.mousedown(function() {
76-
$(".modal").draggable();
77-
})
7875
.append(
7976
options.body || $("<p/>")
8077
)

0 commit comments

Comments
 (0)