Skip to content

Commit

Permalink
make the sidebar button unfocusable
Browse files Browse the repository at this point in the history
  • Loading branch information
leotrs committed May 5, 2024
1 parent b9189d6 commit f3f29c8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions rsm/static/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ export function setupClassInteractions() {
};
});

$(".tools-sidebar").click(function() {
$(".tools-sidebar").mousedown(function(e) {
// This element cannot receive focus via the mouse because it needs to access
// the currently focused element - and clicking it would normally change the
// focus to it.
e.stopImmediatePropagation(); //stops event bubbling
e.preventDefault(); //stops default browser action (focus)
}).click(function() {
const src = $("body").children(".rsm-source");
console.log(src.text());
})
console.log(document.activeElement);
});

$(".handrail").mouseleave(function () {
$(this).find(".options").addClass("hide");
Expand Down

0 comments on commit f3f29c8

Please sign in to comment.