Skip to content

Commit

Permalink
changed textInputActive bool condition to include search type input t…
Browse files Browse the repository at this point in the history
…o extend keyboard shortcut bypass
  • Loading branch information
AndrewPhilbin committed Sep 11, 2023
1 parent 67a08ef commit efaf4f3
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ const mapStateToProps = state => {
}
}
const textInputActive = function(event) {
if (event.target.type === 'text')
if (event.target.type === 'text' || event.target.type === 'search') {
return true
}

return (event.target.nodeName != null &&
event.target.getAttribute('type') != null &&
event.target.nodeName.toLowerCase() === 'input' &&
event.target.getAttribute('type').toLowerCase() === 'text') ||
event.target.nodeName.toLowerCase() === 'textarea'
(event.target.getAttribute('type').toLowerCase() === 'text' ||
event.target.getAttribute('type').toLowerCase() === 'search')) ||
event.target.nodeName.toLowerCase() === 'textarea'

}

const mapDispatchToProps = dispatch => {
Expand Down

0 comments on commit efaf4f3

Please sign in to comment.