Skip to content

Commit

Permalink
fix: if no details are available don't show the tooltip (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbajpeyi authored Sep 9, 2024
1 parent d879b6c commit 1fee787
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 26 deletions.
13 changes: 8 additions & 5 deletions dist/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions dist/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions src/Form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,14 @@ class Form {
// we'd have any other items to show. This lets us know if we're
// just showing in-context signup, or with other autofill items.
const hasSavedDetails = this.device.settings.canAutofillType({ mainType, subtype, variant }, null)

if (this.isCredentialsImoprtAvailable) return true

// Don't open the tooltip on input focus whenever it'll only show in-context signup
if (!hasSavedDetails && isIncontextSignupAvailable) return false
return true
if (hasSavedDetails) {
return true
} else if (isIncontextSignupAvailable) {
// Don't open the tooltip on input focus whenever it'll only show in-context signup
return false
} else {
return this.isCredentialsImoprtAvailable
}
}

if (this.device.globalConfig.isExtension || this.device.globalConfig.isMobileApp) {
Expand Down
13 changes: 8 additions & 5 deletions swift-package/Resources/assets/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions swift-package/Resources/assets/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1fee787

Please sign in to comment.