Skip to content

Commit

Permalink
Fix "go input" not working when the hints are off (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-tejada authored May 27, 2024
1 parent 9943066 commit aba0201
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/content/actions/focus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { notify } from "../notify/notify";
import { dispatchKeyDown, dispatchKeyUp } from "../utils/dispatchEvents";
import { editableElementSelector, getFocusable } from "../utils/domUtils";
import { ElementWrapper } from "../../typings/ElementWrapper";
import { getWrapperForElement } from "../wrappers/wrappers";
import { getOrCreateWrapper } from "../wrappers/ElementWrapperClass";

export function focus(wrappers: ElementWrapper[]): TalonAction[] | undefined {
window.focus();
Expand Down Expand Up @@ -36,10 +36,7 @@ export async function focusFirstInput() {
return;
}

const wrapper = getWrapperForElement(firstInput);
if (wrapper) {
focus([wrapper]);
}
focus([getOrCreateWrapper(firstInput)]);
}

export function blur() {
Expand Down

0 comments on commit aba0201

Please sign in to comment.