Skip to content

Commit

Permalink
fix: MOP ignore keypress if input is focused
Browse files Browse the repository at this point in the history
  • Loading branch information
HKuz authored and agritheory committed Feb 15, 2023
1 parent 23c4f83 commit e073c09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions check_run/public/js/check_run/check_run.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ check_run.mount_table = frm => {
}

check_run.keyDownHandler = e => {

if(!check_run.frm) {
return
}

if(document.activeElement.tagName == "INPUT" || document.activeElement.tagName == "TEXTAREA") {
return
}

if(e.keyCode == 40 && check_run.frm.check_run_state.selectedRow < (check_run.frm.check_run_state.transactions.length - 1)){
for(let j=0;j<check_run.frm.check_run_state.transactions.length;j++) {
if(check_run.frm.check_run_state.transactions[j].mopIsOpen) {
Expand Down

0 comments on commit e073c09

Please sign in to comment.