Skip to content

Commit

Permalink
Make the notice bar draggable
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-ys committed Nov 3, 2024
1 parent f9ead77 commit 6fbe70e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/views/enhanced_ux/layouts/_compact_notice_bar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@

addCloseButton(e);
setFadeOutEvent(e);
$(e).draggable({
create: function () {
// Remove the position style set by jQuery UI
$(e).css("position", "");
},
start: function (ev) {
if (isMobile()) {
ev.preventDefault();
}
},
});
});
}

Expand Down Expand Up @@ -156,6 +167,11 @@
left: 20px;
box-sizing: border-box;
z-index: 300;
cursor: grab;

&:active {
cursor: grabbing;
}
}
}
</style>

0 comments on commit 6fbe70e

Please sign in to comment.