Skip to content

Commit aba0201

Browse files
authored
Fix "go input" not working when the hints are off (#299)
1 parent 9943066 commit aba0201

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/content/actions/focus.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { notify } from "../notify/notify";
33
import { dispatchKeyDown, dispatchKeyUp } from "../utils/dispatchEvents";
44
import { editableElementSelector, getFocusable } from "../utils/domUtils";
55
import { ElementWrapper } from "../../typings/ElementWrapper";
6-
import { getWrapperForElement } from "../wrappers/wrappers";
6+
import { getOrCreateWrapper } from "../wrappers/ElementWrapperClass";
77

88
export function focus(wrappers: ElementWrapper[]): TalonAction[] | undefined {
99
window.focus();
@@ -36,10 +36,7 @@ export async function focusFirstInput() {
3636
return;
3737
}
3838

39-
const wrapper = getWrapperForElement(firstInput);
40-
if (wrapper) {
41-
focus([wrapper]);
42-
}
39+
focus([getOrCreateWrapper(firstInput)]);
4340
}
4441

4542
export function blur() {

0 commit comments

Comments
 (0)