aboutsummaryrefslogtreecommitdiff
path: root/src/content/presenters/FocusPresenter.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 10:01:24 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 10:48:39 +0900
commit2e7006ce24c42ec2b6642346d153429338e7334e (patch)
treef1eb9e843ab4ec5d7d3f08fff8c858174b6f1284 /src/content/presenters/FocusPresenter.ts
parent0881f92d20cb7b4f5a75671df739c3eaa3cd0ff0 (diff)
npm run lint:fix
Diffstat (limited to 'src/content/presenters/FocusPresenter.ts')
-rw-r--r--src/content/presenters/FocusPresenter.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content/presenters/FocusPresenter.ts b/src/content/presenters/FocusPresenter.ts
index 7e20cd6..842c41e 100644
--- a/src/content/presenters/FocusPresenter.ts
+++ b/src/content/presenters/FocusPresenter.ts
@@ -6,10 +6,10 @@ export default interface FocusPresenter {
export class FocusPresenterImpl implements FocusPresenter {
focusFirstElement(): boolean {
- let inputTypes = ['email', 'number', 'search', 'tel', 'text', 'url'];
- let inputSelector = inputTypes.map(type => `input[type=${type}]`).join(',');
- let targets = window.document.querySelectorAll(inputSelector + ',textarea');
- let target = Array.from(targets).find(doms.isVisible);
+ const inputTypes = ['email', 'number', 'search', 'tel', 'text', 'url'];
+ const inputSelector = inputTypes.map(type => `input[type=${type}]`).join(',');
+ const targets = window.document.querySelectorAll(inputSelector + ',textarea');
+ const target = Array.from(targets).find(doms.isVisible);
if (target instanceof HTMLInputElement) {
target.focus();
return true;