Skip to content

Commit

Permalink
Merge pull request #34 from michael-maltsev/patch-1
Browse files Browse the repository at this point in the history
Improved draggable option for Firefox
  • Loading branch information
GedMarc authored Feb 11, 2021
2 parents ac292f8 + e5b64de commit 9f01df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,7 @@
makeModalDraggable: function () {
if (this.options.draggable) {
this.getModalHeader().addClass(this.getNamespace('draggable')).on('mousedown', { dialog: this }, function (event) {
event.preventDefault();
var dialog = event.data.dialog;
dialog.draggableData.isMouseDown = true;
var dialogOffset = dialog.getModalDialog().offset();
Expand All @@ -1169,7 +1170,6 @@
if (!dialog.draggableData.isMouseDown) {
return;
}
event.preventDefault();
dialog.getModalDialog().offset({
top: event.clientY - dialog.draggableData.mouseOffset.top,
left: event.clientX - dialog.draggableData.mouseOffset.left
Expand Down

1 comment on commit 9f01df7

@michael-maltsev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GedMarc you tagged it as 4.3.9. Can you also update the dist folder?

Please sign in to comment.