{"id":15015954,"url":"https://github.com/zestia/ember-auto-focus","last_synced_at":"2026-03-01T23:03:00.858Z","repository":{"id":3424052,"uuid":"49431688","full_name":"zestia/ember-auto-focus","owner":"zestia","description":":eyeglasses: An autofocus solution for Ember apps","archived":false,"fork":false,"pushed_at":"2026-01-14T17:08:19.000Z","size":7941,"stargazers_count":22,"open_issues_count":5,"forks_count":2,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-01-14T19:51:01.204Z","etag":null,"topics":["autofocus-element","ember"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zestia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-01-11T14:30:47.000Z","updated_at":"2026-01-14T17:08:24.000Z","dependencies_parsed_at":"2024-10-31T07:03:44.823Z","dependency_job_id":"694e3f74-25f1-424c-b684-a46425684649","html_url":"https://github.com/zestia/ember-auto-focus","commit_stats":{"total_commits":385,"total_committers":6,"mean_commits":64.16666666666667,"dds":"0.36883116883116884","last_synced_commit":"b80081869a70ed0fd51376c2824235be075112b6"},"previous_names":["amk221/ember-auto-focus","amk221/ember-autofocus"],"tags_count":80,"template":false,"template_full_name":null,"purl":"pkg:github/zestia/ember-auto-focus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-auto-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-auto-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-auto-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-auto-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zestia","download_url":"https://codeload.github.com/zestia/ember-auto-focus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-auto-focus/sbom","scorecard":{"id":190029,"data":{"date":"2025-07-14","repo":{"name":"github.com/zestia/ember-auto-focus","commit":"67b9208ee53e4d7edd18b0a352c32b09abde9506"},"scorecard":{"version":"v5.2.1-18-gbb9c347d","commit":"bb9c347dff6349d986baab6578a46d68a5524c62"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"16 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/zestia/ember-auto-focus/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/zestia/ember-auto-focus/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/zestia/ember-auto-focus/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/zestia/ember-auto-focus/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/zestia/ember-auto-focus/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/zestia/ember-auto-focus/ci.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:47","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T20:29:02.512Z","repository_id":3424052,"created_at":"2025-08-16T20:29:02.512Z","updated_at":"2025-08-16T20:29:02.512Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29987656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autofocus-element","ember"],"created_at":"2024-09-24T19:48:12.335Z","updated_at":"2026-03-01T23:03:00.852Z","avatar_url":"https://github.com/zestia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @zestia/ember-auto-focus\n\n\u003c!-- [![Ember Observer][ember-observer-badge]][ember-observer-url] --\u003e\n\u003c!-- [![GitHub Actions][github-actions-badge]][github-actions-url] --\u003e\n\n[npm-badge]: https://img.shields.io/npm/v/@zestia/ember-auto-focus.svg\n[npm-badge-url]: https://www.npmjs.com/package/@zestia/ember-auto-focus\n[github-actions-badge]: https://github.com/zestia/ember-auto-focus/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/zestia/ember-auto-focus/actions\n[ember-observer-badge]: https://emberobserver.com/badges/-zestia-ember-auto-focus.svg\n[ember-observer-url]: https://emberobserver.com/addons/@zestia/ember-auto-focus\n\nHTML's `autofocus` attribute focuses an element on the first occurrence of the attribute. But, does nothing on subsequent renders of the same element.\n\nThis addon provides an element modifier, which auto focuses the element when it is inserted into the DOM.\n\n## Installation\n\n```\nember install @zestia/ember-auto-focus\n```\n\nAdd the following to `~/.npmrc` to pull @zestia scoped packages from Github instead of NPM.\n\n```\n@zestia:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=\u003cYOUR_GH_TOKEN\u003e\n```\n\n## Demo\n\nhttps://zestia.github.io/ember-auto-focus\n\n## Example\n\n```handlebars\n{{#if this.showField}}\n  \u003cinput {{autoFocus}} /\u003e\n{{/if}}\n```\n\n## `{{autoFocus}}`\n\n### Arguments\n\n#### `selector`\n\nOptional. This _positional_ argument allows you to auto focus a child element. Useful for occasions when you don't have access to the children.\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample\u003c/summary\u003e\n\n```handlebars\n\u003cExampleComponent {{autoFocus '.some-child'}} /\u003e\n```\n\n\u003c/details\u003e\n\n#### `disabled`\n\nOptional. This _named_ argument turns off auto focusing. Note that this behaviour can now also be achieved with a conditional modifier (this wasn't always the case).\n\n#### `options`\n\nOptional. _Any other named arguments_ are passed to the `focus` method. Some options available include `preventScroll` and `focusVisible`\n\n## Notes\n\nThis modifier has certain benefits over other implementations:\n\n1. It waits until after render, so that in your actions you can be sure `document.activeElement` is as you'd expect ([Example](https://github.com/zestia/ember-auto-focus/blob/845ea30035aa55fb69164e9eb9001c6fe08fa73b/tests/integration/modifiers/auto-focus-test.js#L86-L98)).\n\n2. It compensates for the fact that child modifiers run their installation before parents in the DOM tree. So nesting `{{autoFocus}}` will work as you would expect. ([Example](https://github.com/zestia/ember-auto-focus/blob/845ea30035aa55fb69164e9eb9001c6fe08fa73b/tests/integration/modifiers/auto-focus-test.js#L100-L114)).\n\n3. It allows you to differentiate between an element that was focused by a user interacting with it, and an element that was focused programmatically. Through `element.dataset.programmaticallyFocused`. ([Example](https://github.com/zestia/ember-auto-focus/blob/8ba15763e5b21e5cc7924339dd65521c965ce722/tests/integration/modifiers/auto-focus-test.js#L116-L144))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzestia%2Fember-auto-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzestia%2Fember-auto-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzestia%2Fember-auto-focus/lists"}