Skip to content

Commit

Permalink
Don't forward keypresses when URL box is active
Browse files Browse the repository at this point in the history
This fixes a bug where pressing return after entering a new URL would
forward the ENTER key to the DOM and sometimes trigger the focussed
result in a Google search.
  • Loading branch information
tombh committed Jun 5, 2018
1 parent ad64b4f commit d6406ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion interfacer/src/browsh/tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ func handleUserKeyPress(ev *tcell.EventKey) {
if (ev.Key() == 9 && ev.Modifiers() == 0) {
nextTab()
}
forwardKeyPress(ev)
if !urlInputBox.isActive {
forwardKeyPress(ev)
}
if activeInputBox != nil {
handleInputBoxInput(ev)
} else {
Expand Down

0 comments on commit d6406ac

Please sign in to comment.