Skip to content

Commit

Permalink
SAK-49955 Site Info tool reordering UX regressions (sakaiproject#12569)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Ottenhoff <[email protected]>
  • Loading branch information
jonespm and ottenhoff authored May 6, 2024
1 parent cff7e74 commit cfd02f1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion site-manage/pageorder/tool/src/webapp/content/js/orderUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ toolOrder.handleKeyboardSort = (sortableId, direction) => {
}

toolOrder.sortable.sort(order, true)

// re-focus on the element
document.getElementById('content::page-row:' + sortableId + ':').focus();
let element = document.getElementById('content::page-row:' + sortableId + ':');
if (element) {
element.focus();
}
else {
console.debug("Element with ID 'content::page-row:" + sortableId + ":' does not exist");
}
};

var serializationChanged = new Boolean(false);
Expand All @@ -28,7 +38,8 @@ $(document).ready(function(){
});

const list = document.getElementById("reorder-list");
list && (toolOrder.sortable = Sortable.create(list, { dataIdAttr: "data-sortable-id" }));
list && (toolOrder.sortable = Sortable.create(list, {
dataIdAttr: "data-sortable-id", scrollSensitivity: 100, forceFallback: true, scroll: true, bubbleScroll: true}));

list.querySelectorAll("li").forEach(li => {

Expand Down

0 comments on commit cfd02f1

Please sign in to comment.