Skip to content

Commit

Permalink
Merge pull request #1023 from nwanduka/patch-7
Browse files Browse the repository at this point in the history
Added Enter key support for back button navigation
  • Loading branch information
birm authored Aug 6, 2024
2 parents f81117d + afff165 commit 3b790e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dev-workbench/workbench.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
class="navbar navbar-expand-lg navbar-dark flex-row px-2"
style="background: rgb(33, 37, 41);"
>
<div style="cursor: pointer;" id="goBack" tabindex="0">
<div role="button" aria-label="Go back" style="cursor: pointer;" id="goBack" tabindex="0">
<i data-feather="arrow-left" class="text-white"></i>
</div>

Expand Down
7 changes: 7 additions & 0 deletions apps/dev-workbench/workbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ $('#goBack').click(function() {
window.history.back();
});

// Keydown event for the back button
$('#goBack').keydown(function(e) {
if (e.keyCode === 13) {
window.history.back();
}
});

// initialize Step 1
function dataSelect() {
$('.navbar-brand').text(' Workbench - Step 1');
Expand Down

0 comments on commit 3b790e0

Please sign in to comment.