Skip to content

Commit

Permalink
(#875) CSS escape HTML ID when instantiating sortable component
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Sep 6, 2024
1 parent 01ada54 commit 937cd02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/js/curator_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ const renderOrderSortableSeries = (series) => {
}

// Create sortable for this series
sortable(`#${series}-order-list`, {
sortable(`#${CSS.escape(series)}-order-list`, {
hoverClass: "has-text-weight-bold"
, itemSerializer(item, container) {
item.label = item.node.textContent
Expand Down Expand Up @@ -1510,7 +1510,7 @@ const updateOrderSortable = () => {
}

for (const series of sortableSet) {
// 3. Series is in sortableSet but not seriesSet, remove <series>-order element
// Series is in sortableSet but not seriesSet, remove <series>-order element
if (!seriesSet.has(series)) {
const orderElt = document.getElementById(`${series}-order`);
orderElt.remove();
Expand Down

0 comments on commit 937cd02

Please sign in to comment.